Skip to content

Conversation

danlobo
Copy link
Contributor

@danlobo danlobo commented Nov 24, 2022

What was changed:

  • Added an imperative method (setNodes) to the NodeEditor
  • Added a new dispatch action to nodesReducer to implement the new action "SET_NODES"

Usage:

pseudo-code below:

const nodeEditor = React.useRef()

const loadNewNodes= () => {
  const newNodes = newNodes.from.somewhere()
  
  nodeEditor.current.setNodes(newNodes);
}

return (
<>
  <button onClick={loadNewNodes}>Click me</button>
  <NodeEditor
    ref={nodeEditor}
    ...
    />
    </>
  )

@atwright147
Copy link

atwright147 commented Mar 10, 2023

@chrisjpatty Any chance of getting this merged? I really need this functionality

@atwright147
Copy link

@danlobo I created a patch for use with patch-package but I am finding that this doesn't work, I get the following message:

Uncaught ReferenceError ReferenceError: connectionMode is not defined

I tried removing the reference to connectionMode from the reducer in the .js and .es.js files but the error persists (which is weird, since that is the only reference to connectionMode I can find.

flume+0.8.1.patch

@HerveZu
Copy link

HerveZu commented Oct 23, 2023

@chrisjpatty Could you review it ? I'd love to use this feature but it's been 8 months now and hasn't been merged yet :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants