File tree 1 file changed +3
-2
lines changed
packages/bento-design-system/src/NumberField
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,12 @@ import { BaseNumberInput } from "./BaseNumberInput";
11
11
type Props = FieldProps < number | undefined , number > &
12
12
BaseNumberProps &
13
13
FormatProps &
14
- Pick < NumberFieldStateOptions , "minValue" | "maxValue" | "step" > ;
14
+ Pick < NumberFieldStateOptions , "minValue" | "maxValue" | "step" | "formatOptions" > ;
15
15
16
16
export function NumberField ( props : Props ) {
17
17
const { locale } = useLocale ( ) ;
18
- const formatOptions = useFormatOptions ( props ) ;
18
+ const defaultFormatOptions = useFormatOptions ( props ) ;
19
+ const formatOptions = props . formatOptions ?? defaultFormatOptions ;
19
20
const state = useNumberFieldState ( { ...props , locale, formatOptions } ) ;
20
21
const inputRef = useRef < HTMLInputElement > ( null ) ;
21
22
You can’t perform that action at this time.
0 commit comments