saving colors when not modified
This commit is contained in:
1 parent
7afda7eb1c
commit
48decb2e16
2 files changed
+11
-2
No files matched your search
@@ -66,7 +66,13 @@ export const NodeEditor: FC<NodeEditorProps> = ({
|
||||
<Button
|
||||
className="node-editor--footer--save"
|
||||
onClick={() => {
|
||||
areYouSureNotReady('save') && onSave(state.data)
|
||||
if (areYouSureNotReady('save')) {
|
||||
if (JSON.stringify(state.data) !== JSON.stringify(node)) {
|
||||
onSave(state.data)
|
||||
} else {
|
||||
onClose()
|
||||
}
|
||||
}
|
||||
}}
|
||||
title={
|
||||
!isReady ? "Some fields have not been properly filled up" : ""
|
||||
|
||||
Reference in new issue
Block a user