File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,15 @@ Input.propTypes = {
192
192
* To specify the type of Input field.
193
193
*/
194
194
type : PropTypes . string ,
195
+ /**
196
+ * To specify how many decimal places to show in the input.
197
+ *
198
+ * For example, if precision is 2:
199
+ * 10 will be shown as "10.00"
200
+ * 10.1 will be shown as "10.10"
201
+ * 9.758 will be rounded and shown as "9.76"
202
+ */
203
+ precision : PropTypes . number ,
195
204
/**
196
205
* To specify the label props to be passed to the Label component.
197
206
*/
Original file line number Diff line number Diff line change @@ -15,13 +15,13 @@ export interface InputProps
15
15
helpText ?: string ;
16
16
className ?: string ;
17
17
nakedInput ?: boolean ;
18
+ precision ?: number ;
18
19
contentSize ?: number ;
19
20
required ?: boolean ;
20
21
labelProps ?: LabelProps ;
21
22
maxLength ?: number ;
22
23
unlimitedChars : boolean ;
23
24
rejectCharsRegex ?: RegExp ;
24
- precision ?: number ;
25
25
}
26
26
27
27
const Input : React . ForwardRefExoticComponent < InputProps > ;
You can’t perform that action at this time.
0 commit comments