Select onChange fires even when clicking the same element that's already selected. #6468
Closed
1 of 2 tasks
Labels
Fixed patch
Completed issues that will be published with next patch (1.0.X)
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.10.2
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
Chrome
Describe the bug
When you load a Select component with options and select one, if you select the same one that's already selected, it will fire an onChange event and I don't think that's normal behavior for a Select since the value is not actually changing. I tried it using both the regular format and the object format, both using a controlled Select component.
To reproduce:
The codesandbox is in 7.11.0 version of Mantine, but my personal repo where I was seeing the issue is v7.10.2.
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/allow-deselect-broken-mantine-rfdxwg
Possible fix
No response
Self-service
The text was updated successfully, but these errors were encountered: