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

actionNodesData is being directly changed in the diagram editor #169

Open
OscarMrZ opened this issue Aug 1, 2024 · 0 comments
Open

actionNodesData is being directly changed in the diagram editor #169

OscarMrZ opened this issue Aug 1, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@OscarMrZ
Copy link
Collaborator

OscarMrZ commented Aug 1, 2024

As per the react documentation, objects put into state:

  const [actionNodesData, setActionNodesData] = useState({});

Should be considered as read-only, however, in the diagram editor , this is the case repeteadly, for example:

actionNodesData[name] = {
        input: [],
        output: [],
        ids: [node.getID()],
        color: node.getColor(),
      };

The logic should be changed so a new object is created, filled and then the state properly updated. This would remove the need of #168, which is just a hotfix imo.

@OscarMrZ OscarMrZ added the bug Something isn't working label Aug 1, 2024
@OscarMrZ OscarMrZ added this to the Version 0.6 milestone Aug 1, 2024
@OscarMrZ OscarMrZ linked a pull request Aug 29, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant