Closed countnazgul closed 2 weeks ago
If you don't use the isOpen
prop in your modal components they will all stay visible.
However, if you wanted to have multiple modals open and close them individually in arbitrary order, there's no way to do that currently. closeModal()
etc. will always closes the most recent first.
Maybe it would make sense to support closing modals by a generated id or something, I'll have to think about that.
closeById
has been added to v2.0.0, so by ignoring isOpen
that should enable this use case
id can be provided to modals.open
Im trying to create something like this:
By passing
$modals.length
I can make the necessary css changes (applying somepadding
/margin
to each modal) to create the layout but my problem is that only the last/active modal is kept visible.