Keep track of the stack of opened Modals
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
Is there a way to keep track of the modals that are open?
Here's my use case.
I'm working with React Suite, which gives me a nice UI for modals, drawers, etc. However, when I call multiple modals, and specially when I mix Drawer and Modal, the backdrop ends up way behind the other modals.
So, I figured, if Nice Modal gave me the current stack, I could compute the correct z-index for each new modal, specially since hardly any older modal would be closed before the newest (at which point that would be my job to ensure that doesn't happen).
Is this possible through the context API on which Nice Modal relies? Is it a good feature to have added?
P.s.: If NIce Modal computed the z-index based on a configurable setting on the provider or something, that would be great too, but I guess that should be the UI's job, not NM's.
Thanks in advance!
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the context API and provider behavior for tracking open modals. The request leaves the target ambiguous between exposing the current modal stack and adding configurable z-index handling, so clarify the desired API and define completion before locating the relevant implementation and tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100