#SvelteFlow: force deselect edges?

1 messages · Page 1 of 1 (latest)

rare beacon
#

looking to deselect all edges after I update their data on edge click event.

Tried,

  onEdgeClick.push(({ edge, event }) => {
    updateEdge(edge.id, (x) => ({ ...x, selected: false }));
  };

where onEdgeClick is an array of callbacks that I have SvelteFlow call on onedgeclick.

I can see that on edge click, the edge becomes selected and immediately after, the edge is selected: false , but I do not actually see the UI update until I manually deselect with the cursor.

fleet turret
#

You want the ability that clicking on an edge doesnt select an edge?

rare beacon
#

Yes
to replace edge selection feature with a mechanic that toggles a prop on the custom edge on click