You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have verified that I use latest version of all @mantine/* packages
What version of @mantine/* packages do you have in package.json?
7.9.1
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
All
Describe the bug
When using a searchable Select component with both controlled value and searchValue, it is impossible to delete the content of the text input as soon as a value has been selected. Steps to reproduce in the attached sandbox:
Choose item "One" from the select component
Click into input and try to delete the last letter of One by pressing backspace
Observed behavior: "One" will re-appear immediately afterwards so it's impossible to search for any other value
This seems to be related to a React re-render upon calling the function in "onSearchChange" which seems to overwrite the searchValue with the currently selected value. The problem also appears when only the value is controlled, not the search value but one still changes some state via the "onSearchChange"
If possible, include a link to a codesandbox with a minimal reproduction
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.9.1
What package has an issue?
@mantine/core
What framework do you use?
Next.js
In which browsers you can reproduce the issue?
All
Describe the bug
When using a searchable Select component with both controlled value and searchValue, it is impossible to delete the content of the text input as soon as a value has been selected. Steps to reproduce in the attached sandbox:
This seems to be related to a React re-render upon calling the function in "onSearchChange" which seems to overwrite the searchValue with the currently selected value. The problem also appears when only the value is controlled, not the search value but one still changes some state via the "onSearchChange"
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-v7-searchable-select-9jmwvn?file=%2Fsrc%2FApp.jsx%3A44%2C21&layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clw8xegty00063j6gu8u0hf4e%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clw8xegtx00023j6gthrbur3p%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clw8xegty00033j6gfrlbx400%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clw8xegty00053j6gbm78n17l%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B60.962440731822355%252C39.037559268177645%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clw8xegtx00023j6gthrbur3p%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clw8xegtx00013j6g6za41z8a%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252FREADME.md%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%252C%257B%2522id%2522%253A%2522clw8z8oz700433j6gyuc2i9fc%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A44%252C%2522startColumn%2522%253A21%252C%2522endLineNumber%2522%253A44%252C%2522endColumn%2522%253A21%257D%255D%252C%2522filepath%2522%253A%2522%252Fsrc%252FApp.jsx%2522%252C%2522state%2522%253A%2522IDLE%2522%257D%255D%252C%2522id%2522%253A%2522clw8xegtx00023j6gthrbur3p%2522%252C%2522activeTabId%2522%253A%2522clw8z8oz700433j6gyuc2i9fc%2522%257D%252C%2522clw8xegty00053j6gbm78n17l%2522%253A%257B%2522id%2522%253A%2522clw8xegty00053j6gbm78n17l%2522%252C%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clw8xegty00043j6g3uigbjfg%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clw8xegty00043j6g3uigbjfg%2522%257D%252C%2522clw8xegty00033j6gfrlbx400%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clw8xegty00033j6gfrlbx400%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D
Possible fix
Self-service
The text was updated successfully, but these errors were encountered: