Fix delete not deleting when searching for something
This commit is contained in:
parent
6b691dc47d
commit
1fd2931e4c
2 changed files with 11 additions and 9 deletions
|
|
@ -172,8 +172,9 @@ export function FlowsProvider({ children }: { children: ReactNode }) {
|
|||
}
|
||||
});
|
||||
setData((prev) => {
|
||||
prev["saved_components"] = cloneDeep(savedComponents);
|
||||
return prev;
|
||||
let newData = cloneDeep(prev);
|
||||
newData["saved_components"] = cloneDeep(savedComponents);
|
||||
return newData;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -41,11 +41,13 @@ export default function SidebarDraggableComponent({
|
|||
const popoverRef = useRef<HTMLDivElement>(null);
|
||||
|
||||
const handlePointerDown = (e) => {
|
||||
const rect = popoverRef.current?.getBoundingClientRect() ?? {
|
||||
left: 0,
|
||||
top: 0,
|
||||
};
|
||||
setCursorPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
||||
if (!open) {
|
||||
const rect = popoverRef.current?.getBoundingClientRect() ?? {
|
||||
left: 0,
|
||||
top: 0,
|
||||
};
|
||||
setCursorPos({ x: e.clientX - rect.left, y: e.clientY - rect.top });
|
||||
}
|
||||
};
|
||||
|
||||
function handleSelectChange(value: string) {
|
||||
|
|
@ -74,9 +76,8 @@ export default function SidebarDraggableComponent({
|
|||
>
|
||||
<div
|
||||
onPointerDown={handlePointerDown}
|
||||
onContextMenu={(e) => {
|
||||
onContextMenuCapture={(e) => {
|
||||
e.preventDefault();
|
||||
console.log("que");
|
||||
setOpen(true);
|
||||
}}
|
||||
key={itemName}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue