Skip to content

Commit 57e34bb

Browse files
committedMar 26, 2025
Fix multiple queries creation on duplicate query
1 parent 36c9085 commit 57e34bb

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed
 

‎client/packages/lowcoder/src/pages/editor/bottom/BottomSidebar.tsx

+9-1
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,15 @@ export function BottomSidebar(props: BottomSidebarProps) {
225225
refTreeComp.children.items.dispatch(pushAction);
226226
});
227227
}
228-
}, [itemsNotInTree, refTreeComp.children.items]);
228+
}, [JSON.stringify(itemsNotInTree)]);
229+
230+
useEffect(() => {
231+
node?.items.forEach((item, idx) => {
232+
if(!Boolean(item.id)) {
233+
node?.deleteItem(idx);
234+
}
235+
})
236+
}, [node?.items])
229237

230238
return (
231239
<Contain style={props.style}>

0 commit comments

Comments
 (0)