Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setNodes #197

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

setNodes #197

wants to merge 1 commit into from

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