Commit f12ee15 1 parent b5cd9cf commit f12ee15 Copy full SHA for f12ee15
File tree 1 file changed +13
-1
lines changed
demo_markdown/docs/input_number
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,16 @@ view! {
32
32
}
33
33
```
34
34
35
+ ### Min / Max
36
+
37
+ ``` rust demo
38
+ let value = create_rw_signal (0 );
39
+
40
+ view! {
41
+ <InputNumber value step = 1 min = - 1 max = 2 / >
42
+ }
43
+ ```
44
+
35
45
### InputNumber Props
36
46
37
47
| Name | Type | Default | Description |
@@ -43,10 +53,12 @@ view! {
43
53
| disabled | ` MaybeSignal<bool> ` | ` false ` | Whether the input is disabled. |
44
54
| invalid | ` MaybeSignal<bool> ` | ` false ` | Whether the input is invalid. |
45
55
| attr: | ` Vec<(&'static str, Attribute)> ` | ` Default::default() ` | The dom attrs of the input element inside the component. |
56
+ | min | ` MaybeSignal<T> ` | ` T::min_value() ` | The minimum number that the input value can take. |
57
+ | max | ` MaybeSignal<T> ` | ` T::max_value() ` | The max number that the input value can take. |
46
58
47
59
#### T impl
48
60
49
- ` T: Add<Output = T> + Sub<Output = T> + Default + Clone + FromStr + ToString + 'static `
61
+ ` T: Add<Output = T> + Sub<Output = T> + PartialOrd + num_traits::Bounded + Default + Clone + FromStr + ToString + 'static `
50
62
51
63
### InputNumber Ref
52
64
You can’t perform that action at this time.
0 commit comments