visuddhinanda преди 2 години
родител
ревизия
a8592b83cc
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      dashboard/src/components/article/EditableTree.tsx

+ 1 - 1
dashboard/src/components/article/EditableTree.tsx

@@ -172,7 +172,7 @@ const EditableTreeWidget = ({
     }
     }
     const update = (_node: TreeNodeData[]) => {
     const update = (_node: TreeNodeData[]) => {
       _node.forEach((value, index, array) => {
       _node.forEach((value, index, array) => {
-        if (value.key === updatedNode.key) {
+        if (value.id === updatedNode.id) {
           array[index].title = updatedNode.title;
           array[index].title = updatedNode.title;
           console.log("key found");
           console.log("key found");
           return;
           return;