mirror of
https://github.com/zadam/trilium.git
synced 2025-11-18 03:00:41 +01:00
refactor(react/dialogs): integrate proper closing of modal
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { useRef, useState } from "preact/hooks";
|
||||
import { closeActiveDialog } from "../../services/dialog.js";
|
||||
import { t } from "../../services/i18n.js";
|
||||
import FormCheckbox from "../react/FormCheckbox.js";
|
||||
import Modal from "../react/Modal.js";
|
||||
@@ -74,12 +73,12 @@ function DeleteNotesDialogComponent() {
|
||||
}}
|
||||
footer={<>
|
||||
<Button text={t("delete_notes.cancel")}
|
||||
onClick={() => closeActiveDialog()} />
|
||||
onClick={() => setShown(false)} />
|
||||
<Button text={t("delete_notes.ok")} primary
|
||||
buttonRef={okButtonRef}
|
||||
onClick={() => {
|
||||
opts.callback?.({ proceed: true, deleteAllClones, eraseNotes });
|
||||
closeActiveDialog();
|
||||
setShown(false);
|
||||
}} />
|
||||
</>}
|
||||
show={shown}
|
||||
|
||||
Reference in New Issue
Block a user