fix(connectionRadius): pass prop to store

This commit is contained in:
moklick
2023-01-26 10:24:58 +01:00
parent 6dbc529b7f
commit 3078777b28
3 changed files with 7 additions and 3 deletions
@@ -48,6 +48,7 @@ type StoreUpdaterProps = Pick<
| 'autoPanOnConnect'
| 'autoPanOnNodeDrag'
| 'onError'
| 'connectionRadius'
> & { rfId: string };
const selector = (s: ReactFlowState) => ({
@@ -125,6 +126,7 @@ const StoreUpdater = ({
autoPanOnConnect,
autoPanOnNodeDrag,
onError,
connectionRadius,
}: StoreUpdaterProps) => {
const {
setNodes,
@@ -181,6 +183,7 @@ const StoreUpdater = ({
useDirectStoreUpdater('autoPanOnConnect', autoPanOnConnect, store.setState);
useDirectStoreUpdater('autoPanOnNodeDrag', autoPanOnNodeDrag, store.setState);
useDirectStoreUpdater('onError', onError, store.setState);
useDirectStoreUpdater('connectionRadius', connectionRadius, store.setState);
useStoreUpdater<Node[]>(nodes, setNodes);
useStoreUpdater<Edge[]>(edges, setEdges);