mirror of
https://github.com/usual2970/certimate.git
synced 2025-06-07 21:19:51 +00:00
fix: inappropriate workflow node config unsaved reminder
This commit is contained in:
parent
411c39b148
commit
52e9341dab
@ -258,12 +258,13 @@ const SharedNodeConfigDrawer = ({
|
||||
const handleClose = () => {
|
||||
if (pending) return;
|
||||
|
||||
const oldValues = Object.fromEntries(Object.entries(node.config ?? {}).filter(([_, value]) => value !== null && value !== undefined));
|
||||
const newValues = Object.fromEntries(Object.entries(getFormValues()).filter(([_, value]) => value !== null && value !== undefined));
|
||||
const oldValues = JSON.parse(JSON.stringify(node.config ?? {}));
|
||||
const newValues = JSON.parse(JSON.stringify(getFormValues()));
|
||||
const changed = !isEqual(oldValues, {}) && !isEqual(oldValues, newValues);
|
||||
|
||||
const { promise, resolve, reject } = Promise.withResolvers();
|
||||
if (changed) {
|
||||
console.log(oldValues, newValues);
|
||||
modalApi.confirm({
|
||||
title: t("common.text.operation_confirm"),
|
||||
content: t("workflow_node.unsaved_changes.confirm"),
|
||||
|
Loading…
x
Reference in New Issue
Block a user