1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-24 20:36:40 +07:00

#58 added change check on dialog

This commit is contained in:
Fedor Katurov 2021-03-29 18:00:08 +07:00
parent 7d4c5a6766
commit c6a7c2cfd6

View file

@ -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;
}