-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
closeModal not working with openModal #2436
Comments
Hi @Eliasmgprado, see multiple opened modals example – https://mantine.dev/others/modals/#multiple-opened-modals |
The example uses openContextModal instead of openModal, the problem is with openModal function. As showed in the code sandbox, when multiple modal are opened with openModal function, you can`t close a single modal with closeModal() function, providing the modalId passed to the props of openModal(). The closeModal() function close all the opened modals, and not just the one of the provided id. |
Hello, |
Fixed in 5.3.3 |
What package has an issue
@mantine/modals
Describe the bug
Want to open mutiple modals with openModal() function and close the modals with closeModal() function, using the modalId provided to the openModal() function. However, closeModal() is closing all opened modals, insted of the modal with the provided modalId.
What version of @mantine/hooks page do you have in package.json?
5.3.0
If possible, please include a link to a codesandbox with the reproduced problem
https://codesandbox.io/embed/thirsty-archimedes-bydsjh?fontsize=14&hidenavigation=1&theme=dark
Do you know how to fix the issue
No
Are you willing to participate in fixing this issue and create a pull request with the fix
No
Possible fix
No response
The text was updated successfully, but these errors were encountered: