File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1616
17172.0.8
1818--------------------------------------------------------------------------------
19- Fixed ` React.PropTypes ` reference warnings
19+ * Fixed ` React.PropTypes ` reference warnings
2020
21212.0.7
2222--------------------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ floating point numbers:
4646< NumericInput step= {0.1 } precision= {2 } value= {50.3 }/ >
4747```
4848
49+ #### Snap to step
50+ If you want your component to "snap" to the closest step value while incrementing
51+ or decrementing (up/down buttons or arrow keys) you can use the ` snap ` prop:
52+ ``` jsx
53+ < NumericInput step= {0.5 } precision= {2 } value= {50.3 } snap/ >
54+ ```
55+
4956#### Custom format
5057By default the component displays the value number as is. However, you can
5158provide your own ` format ` function that will be called with the numeric value
@@ -73,6 +80,7 @@ Name | Type | Default
7380** style** |` object ` or ` false ` | none
7481** size** |` number ` or ` string ` | none
7582** mobile** |` true ` , ` false ` , 'auto' or ` function ` |` auto `
83+ ** snap** |` boolean ` | none (false)
7684
7785Any other option is passed directly the input created by the component. Just
7886don't forget to camelCase the attributes. For example ` readonly ` must be ` readOnly ` .
You can’t perform that action at this time.
0 commit comments