-
-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[NumberField] snapOnStep
prop
#1560
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for base-ui ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Using small or large step with the custom function doesn't work. Decrement doesn't work at all, while increment adds a double value. See https://codesandbox.io/p/devbox/silly-moser-t85lpm?file=%2Fsrc%2FApp.tsx%3A12%2C22&workspaceId=ws_QAeLcZEcDnfGaFA47etEUH |
@michaldudak sandbox is private |
Try now |
Signed-off-by: atomiks <[email protected]>
It now works fine with |
@michaldudak yeah - hadn't yet changed the implementation after our chat. Just changed the math in a new commit and updated PR description with additional details |
Signed-off-by: atomiks <[email protected]>
stepBehavior
propsnapOnStep
prop
Closes #1542
Closes #1010
The new
snapOnStep
prop is a boolean:true
: the value is snapped to the nearest step when stepping (incrementing/decrementing). So1.07
with a step of1
becomes2
when incrementingfalse
(new default): the value isn't snapped at all. So1.07
with a step of1
becomes2.07
.Also new behavior for
true
:step
, just likelargeStep
already did.