eBay / nice-modal-react

A modal state manager for React.
https://ebay.github.io/nice-modal-react
MIT License
1.96k stars 110 forks source link

Feature request: `NiceModal.activeModals` #14

Closed orange4glace closed 2 years ago

orange4glace commented 2 years ago

First, thanks for the nice library.

It would be nice if there's a API to get current active modals like NiceModal.activeModals :>

supnate commented 2 years ago

Hi @orange4glace , could you please give any use cases for the feature?

rlabarrett commented 2 years ago

I have a need for something like this as well. The application I am working on has stacks of modals that once closed need to make some api calls. It would be preferable to make a single api call after all modals are closed versus a single calls as they close down.

supnate commented 2 years ago

This could be achieved by https://github.com/eBay/nice-modal-react/issues/63