Is it possible to stop the dialog from closing when using the accept/cancel listeners? I've now set a custom button in my dialog. Is there something build-in in the MDC-dialog component to handle this?
Thanks in advance!
Is it possible to stop the dialog from closing when using the accept/cancel listeners? I've now set a custom button in my dialog. Is there something build-in in the MDC-dialog component to handle this?
Thanks in advance!
Accordingly, to the documentation, you can disable escape and click on the scrim by setting the following parameters.
const dialog_add_user = new mdc.dialog.MDCDialog(document.querySelector('#dialog_form_user'));
dialog_add_user.escapeKeyAction = "";
dialog_add_user.scrimClickAction = "";
Also, remove data-mdc-dialog-action="xxxxx" from your buttons to keep the dialog open.
I hope it helps.