Comments (2)
You may need use a separate state for such cases:
const [pending, setPending] = useState(false);
const showModal = () => {
setPending(true);
modal.show(MyModal, {}).then(() => {
setPending(false);
}
}
Or, you just handle pending state inside a modal.
from nice-modal-react.
This is the solution I first remembered. But thought you wanted to implement inside the library.
In that case this issue can be closed π
from nice-modal-react.
Related Issues (20)
- Problem with nested NiceModal Provider HOT 3
- Nice Modal integration with Material UI HOT 3
- Problem with getting data from react-router-dom useParams hook HOT 7
- Can the .show() method be smarter about its return type? HOT 3
- NiceModalProps should let objects with id HOT 5
- How to lazy load a mui dialog in nextjs when it's open? HOT 6
- Source map references file not in npm package HOT 3
- I want to destroy all the popups that are being displayed when the backend interface 401, how do I do that? HOT 3
- MUI Drawer help method HOT 1
- bug: ε½θ·―η±εηεεζΆοΌεΌΉηͺδΈδΌθͺε¨ιζ― HOT 6
- Globally check if any modal is visible HOT 1
- Unnecessary re-render when showing multiple modals..? HOT 4
- Hot module reloading / fast refresh support? HOT 2
- Disable body scroll lock and react portal HOT 1
- Is this library able to be used with Next.js 13 and App router? HOT 5
- Type regression in 1.2.9 HOT 13
- remove() Function without Modal ID just like hide() HOT 2
- Refactor modalHandler into a React Hook HOT 2
- [Request] Add default to remove modal HOT 3
- [Question] Typesafe args HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nice-modal-react.