File tree 1 file changed +2
-8
lines changed
1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,11 @@ export function NumberInput(props: Props) {
17
17
18
18
const safeSetValue = ( value : number ) => {
19
19
setRawValue ( value ) ;
20
- if (
21
- value < props . min ||
22
- value > props . max ||
23
- isNaN ( value ) ||
24
- ! Number . isInteger ( value )
25
- ) {
20
+ if ( value < props . min || value > props . max || isNaN ( value ) ) {
26
21
return ;
27
22
}
28
23
29
24
if ( value !== props . value ) {
30
- // TODO, revisit this for x scale/y scale slider
31
- // console.log("safe Set", value);
32
25
props . setValue ( value ) ;
33
26
}
34
27
} ;
@@ -59,6 +52,7 @@ export function NumberInput(props: Props) {
59
52
class = "relative rounded-md focus-within:(ring-2 ring-fore-base ring-offset-2 ring-offset-back-base) bg-back-base hover:bg-fore-base/5"
60
53
minValue = { props . min }
61
54
maxValue = { props . max }
55
+ step = { props . step }
62
56
rawValue = { focused ( ) ? rawValue ( ) : props . value }
63
57
onRawValueChange = { safeSetValue }
64
58
>
You can’t perform that action at this time.
0 commit comments