-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How am I supposed to prevent a modal from being closed? #367
Comments
I'm pretty sure you can just set the escToClose and clickToClose props to false. |
I'm also running into this issue. I want to allow click outside or escape key to close the dialog, but I want to run some logic first to verify it's what the user wants to do. Is this not possible? |
For the project in question I just stayed with v3, cause I didn't find a good solution yet |
@Twanghofer I don't want vfm users to be stuck in v3 because of this situation. I'm sorry for the delay in replying to you. |
feat: add `stop()` for `@beforeOpen` and `beforeClose` event #367
* rename module extension to mjs * chore: update lock file * fix: fixed generic component type in useModal composable * docs: update type * chore: bump deps * fix: bump deps * chore: update example/nuxt3 * docs: #385 * fix: #390 * chore: use vite-plugin-dts to build lib * feat: add `stop()` for `@beforeOpen` and `beforeClose` event #367 * refactor: move watch modelValueLocal into setModelValueLocal * fix: setModelValueLocal and add StopEvent example * perf: use getter and setter instead of `computed` for `modelValueLocal` * docs: add event.stop() back * refactor: delete CoreModal, this will also fixed #362 * refactor: improve type, lint, cleanup * feat: add overlayBehavior prop to VueFinalModal #405 * refactor: rename type Modal to ModalExposed * chore: fix nestedModal viteplay example * fix: overlayBehavior * feat: add close function to defineSlots * docs: scoped slots close * chore: reduce bundle size a bit --------- Co-authored-by: AdamMerrifield <adam.merrifield@gmail.com> Co-authored-by: Alex Liu <dsa1314@gmail.com>
The v4.5.0 is released |
Since the Migration from v3 to v4, I am not sure how to do this. The migration guide suggests, that 'It's easy to have a condition before open or before close the modal', but this won't work when using escToClose or clickToClose.
How can I prevent a Modal from being closed with escToClose or clickToClose?
The text was updated successfully, but these errors were encountered: