@@ -45,6 +45,9 @@ spinbutton does not have a value, the hidden input's value will be an empty stri
45
45
The ` v-model ` always returns the value as a number. The ` v-model ` can be ` null ` if no initial value
46
46
is set.
47
47
48
+ If the initial value is ` null ` no value will be displayed in the spinbutton. Use the ` placeholder `
49
+ prop to show a string when the spinbutton has no value (i.e. ` placeholder="--" ` ).
50
+
48
51
## Min, max, and step
49
52
50
53
Spinbuttons have a default range from ` 1 ` to ` 100 ` , which can be changed by setting the ` min ` and
@@ -66,7 +69,7 @@ set the `wrap` prop to `true`.
66
69
<template >
67
70
<div >
68
71
<label for =" sb-wrap" >Wrapping value spin button</label >
69
- <b-form-spinbutton id =" sb-wrap" wrap min =" 1" max =" 25" ></b-form-spinbutton >
72
+ <b-form-spinbutton id =" sb-wrap" wrap min =" 1" max =" 25" placeholder = " -- " ></b-form-spinbutton >
70
73
</div >
71
74
</template >
72
75
@@ -84,13 +87,13 @@ As with other form controls, `<b-form-spinbutton>` supports small and large sizi
84
87
<template >
85
88
<div >
86
89
<label for =" sb-small" >Spin button - Small size</label >
87
- <b-form-spinbutton id =" sb-small" size =" sm" class =" mb-2" ></b-form-spinbutton >
90
+ <b-form-spinbutton id =" sb-small" size =" sm" placeholder = " -- " class =" mb-2" ></b-form-spinbutton >
88
91
89
92
<label for =" sb-default" >Spin button - Default size</label >
90
- <b-form-spinbutton id =" sb-default" class =" mb-2" ></b-form-spinbutton >
93
+ <b-form-spinbutton id =" sb-default" placeholder = " -- " class =" mb-2" ></b-form-spinbutton >
91
94
92
95
<label for =" sb-large" >Spin button - Large size</label >
93
- <b-form-spinbutton id =" sb-large" size =" lg" class =" mb-2" ></b-form-spinbutton >
96
+ <b-form-spinbutton id =" sb-large" size =" lg" placeholder = " -- " class =" mb-2" ></b-form-spinbutton >
94
97
</div >
95
98
</template >
96
99
0 commit comments