Skip to content
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

NumberInput: min/max partially overwrites startValue #5308

Closed
julihereu opened this issue Nov 22, 2023 · 3 comments
Closed

NumberInput: min/max partially overwrites startValue #5308

julihereu opened this issue Nov 22, 2023 · 3 comments
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)

Comments

@julihereu
Copy link

What package has an issue?

@mantine/core

Describe the bug

If using the NumberInput in Mantine with a combination of startValue and min, the value of min overwrites that of startValue. When clicking the increment control on the right, it initiates with the value of min (decrement works like intended). The same thing happens the other way round with the combination of max and clicking on decrement. Without min or max, the startValue functions perfectly fine.

What version of @mantine/* packages do you have in package.json? (Note that all @mantine/* packages must have the same version in order to work correctly)

7.2.2

If possible, please include a link to a codesandbox with a minimal reproduction

https://codesandbox.io/s/magical-smoke-gsqp8j

Do you know how to fix the issue

No

Do you want to send a pull request with a fix?

None

Possible fix

No response

@rtivital
Copy link
Member

Attached sandbox does not have a reproduction

@julihereu
Copy link
Author

julihereu commented Nov 22, 2023

I beg your pardon, now it should work. I have assembled two NumberInputs with the same startValue and the first one has a min.

  1. Click the increment control button of the first input. The initial value is the value of min (-1000).
  2. Click the increment control button of the second input. The initial value is the value of startValue (20).

@rtivital rtivital added the Fixed patch Completed issues that will be published with next patch (1.0.X) label Dec 4, 2023
@rtivital
Copy link
Member

rtivital commented Dec 7, 2023

Fixed in 7.3.1

@rtivital rtivital closed this as completed Dec 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fixed patch Completed issues that will be published with next patch (1.0.X)
Projects
None yet
Development

No branches or pull requests

2 participants