mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
#58 added change check on dialog
This commit is contained in:
parent
7d4c5a6766
commit
c6a7c2cfd6
1 changed files with 1 additions and 1 deletions
|
@ -27,7 +27,7 @@ const EditorDialog: FC<Props> = ({ node, onRequestClose }) => {
|
|||
const component = useMemo(() => node.type && prop(node.type, NODE_EDITORS), [node.type]);
|
||||
|
||||
const onClose = useCallback(() => {
|
||||
if (!window.confirm('Точно выйти?')) {
|
||||
if (dirty && !window.confirm('Точно выйти?')) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue