From 306f56d7f22208a031e2db83d97983bf52ae10e0 Mon Sep 17 00:00:00 2001 From: moklick Date: Tue, 26 Sep 2023 13:09:50 +0200 Subject: [PATCH] chore(react): export handleParentExpand --- packages/react/src/index.ts | 2 +- packages/react/src/utils/changes.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/index.ts b/packages/react/src/index.ts index ecb71791..37a6bc74 100644 --- a/packages/react/src/index.ts +++ b/packages/react/src/index.ts @@ -24,7 +24,7 @@ export { default as useOnSelectionChange, type UseOnSelectionChangeOptions } fro export { default as useNodesInitialized, type UseNodesInitializedOptions } from './hooks/useNodesInitialized'; export { useNodeId } from './contexts/NodeIdContext'; -export { applyNodeChanges, applyEdgeChanges } from './utils/changes'; +export { applyNodeChanges, applyEdgeChanges, handleParentExpand } from './utils/changes'; export { isNode, isEdge, getIncomers, getOutgoers, addEdge, updateEdge, getConnectedEdges } from './utils/general'; export * from './additional-components'; diff --git a/packages/react/src/utils/changes.ts b/packages/react/src/utils/changes.ts index 5deb3fdc..a51eaba4 100644 --- a/packages/react/src/utils/changes.ts +++ b/packages/react/src/utils/changes.ts @@ -1,7 +1,7 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ import type { Node, Edge, EdgeChange, NodeChange } from '../types'; -function handleParentExpand(res: any[], updateItem: any) { +export function handleParentExpand(res: any[], updateItem: any) { const parent = res.find((e) => e.id === updateItem.parentNode); if (parent) {