refactor defaultNodes/defaultEdges handling (#3882)
* refactor(react): cleanup defaultnodes/defaultedges handling * chore(examples): cleanup * chore(examples): cleanup * fix(react): selection for uncontrolled flows
This commit is contained in:
@@ -219,11 +219,13 @@ export function applyEdgeChanges<EdgeType extends Edge = Edge>(
|
||||
return applyChanges(changes, edges) as EdgeType[];
|
||||
}
|
||||
|
||||
export const createSelectionChange = (id: string, selected: boolean): NodeSelectionChange | EdgeSelectionChange => ({
|
||||
id,
|
||||
type: 'select',
|
||||
selected,
|
||||
});
|
||||
export function createSelectionChange(id: string, selected: boolean) {
|
||||
return {
|
||||
id,
|
||||
type: 'select',
|
||||
selected,
|
||||
};
|
||||
}
|
||||
|
||||
export function getSelectionChanges(
|
||||
items: any[],
|
||||
|
||||
Reference in New Issue
Block a user