You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I using UseModal() to create a dynamic modals with edit forms for a data grid. It's working really well, but I've hit a snag.
I need to display a warning before closing the modal if the form has changed (and is not being saved). The warning uses an async method to await for user confirmation, so I'm trying this:
...
onBeforeClose: async (ev) => {
const close = await beforeEditModalClose();
if (!close) {
ev.stop();
}
}
...
the modal is closing before I've got the result from beforeEditModalClose()