[Request] Add a modal.removeResolve(false) helper function
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.3k
- Forks
- 127
- PR merge metrics
- No merged PRs in 30d
Description
In all my modal components, I either return a response, or if the user closes the modal I do something like this:
<Modal
onClose={() => {
modal.resolve(false);
modal.remove();
}}
>
However, this is not ideal since I'm passing a new onClose function instance on each render. It would be great if there was a utility function on the modal instance that did both of these steps in one. 🙌
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 locating the modal instance methods used by the example, especially resolve and remove, and inspect how modal components expose or invoke them. Add a helper that combines the demonstrated close behavior, then verify that closing a modal resolves false and removes it without requiring a separately created onClose callback.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100