Open
Description
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()
Any suggeestions? Thanks