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.13.4
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Hello,
After upgrading my project to Mantine 7.13.4 (from 7.12.2), I observed that when using ComboBox, the onOpen function is now called each time the <Combobox.Options></Combobox.Options> is modified through onOptionSubmit.
I made a reproduction case here: https://codesandbox.io/p/sandbox/mantine-react-template-forked-763gq7 based on the Mantine Combobox documentation (https://mantine.dev/core/combobox/#usage).
Using Mantine 7.13.4, we can see that the onOpen function is called on each component render which leads to an infinite loop when the Combobox remains opened. If the dependencies are downgraded to 7.13.3, then the "open counter" is only incremented when the Combobox opens, as expected.
If the onOpen call depends on the onOpen value, then if an onOpen arrow function triggers a re-render of the Combobox (to do a Combobox's store focusSearchInput() for instance) I think that the arrow function evaluates as a new value and triggers a new call to onOpen (in a infinite loop way).
Dependencies check up
What version of @mantine/* packages do you have in package.json?
7.13.4
What package has an issue?
@mantine/core
What framework do you use?
Vite
In which browsers you can reproduce the issue?
All
Describe the bug
Hello,
After upgrading my project to Mantine 7.13.4 (from 7.12.2), I observed that when using
ComboBox
, theonOpen
function is now called each time the<Combobox.Options></Combobox.Options>
is modified throughonOptionSubmit
.I made a reproduction case here: https://codesandbox.io/p/sandbox/mantine-react-template-forked-763gq7 based on the Mantine Combobox documentation (https://mantine.dev/core/combobox/#usage).
Using Mantine 7.13.4, we can see that the
onOpen
function is called on each component render which leads to an infinite loop when the Combobox remains opened. If the dependencies are downgraded to 7.13.3, then the "open counter" is only incremented when the Combobox opens, as expected.Maybe it is related to #7000.
If possible, include a link to a codesandbox with a minimal reproduction
https://codesandbox.io/p/sandbox/mantine-react-template-forked-763gq7
Possible fix
No response
Self-service
The text was updated successfully, but these errors were encountered: