mantine icon indicating copy to clipboard operation
mantine copied to clipboard

optional-multi-modal: Adding `shouldReplaceExistingModal` prop to mod…

Open Huiet opened this issue 3 months ago • 1 comments

…al manager.

Adding a property (shouldReplaceExistingMOdal) to be used by modal manager that allow modals to be opened without closing other modals that may be opened. This works in a way similar to nesting modals in the DOM, but can be done programatically.

The underlying change was to change the current modal in the modal manager to be an array, that way multiple modals can be rendered at a time instead of just one.

Huiet avatar Nov 25 '25 14:11 Huiet

It works incorrectly with escape key. When multiple modals are opened and escape key is pressed, the first one that closes is the underlying modal. See example of incorrect behavior on the video.

https://github.com/user-attachments/assets/0c706c26-c182-4eb4-bbc4-cbdbbfeecb12

rtivital avatar Dec 08 '25 19:12 rtivital