refactor(actions): addSelectedElements => addSelectedNodes, addSelectedEdges

This commit is contained in:
moklick
2021-11-26 15:18:27 +01:00
parent a032306408
commit d260abec75
9 changed files with 46 additions and 39 deletions
+2 -2
View File
@@ -105,8 +105,8 @@ export function createNodeInternals(nodes: Node[], nodeInternals: NodeInternals)
return nextNodeInternals;
}
export const createNodeOrEdgeSelectionChange = (selected: boolean) => (item: Node | Edge) => ({
id: item.id,
export const createNodeOrEdgeSelectionChange = (selected: boolean) => (item: Node | Edge | string) => ({
id: typeof item === 'string' ? item : item.id,
type: 'select',
selected,
});