-
Notifications
You must be signed in to change notification settings - Fork 7
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
fixes node title not changing #536
Conversation
🦋 Changeset detectedLatest commit: a70b5b1 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Failed to generate code suggestions for PR |
); | ||
|
||
// Update local state when the annotation changes | ||
React.useEffect(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The observer should trigger the rerender anyway, we shouldn't need to update the local state
/> | ||
</Stack> | ||
); | ||
}; | ||
}); | ||
|
||
const NodeSettings = ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could actually do an observer here in the node Settings once to auto rerender the attributes here
This reverts commit c0967c1.
@@ -15,7 +15,7 @@ import { observer } from 'mobx-react-lite'; | |||
import { useGraph } from '@/hooks/useGraph.js'; | |||
import { useSelector } from 'react-redux'; | |||
|
|||
export function NodeSettingsPanel() { | |||
export const NodeSettingsPanel = observer(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wouldn't do anything if there isn't an observable passed to it
}, | ||
[selectedNode], | ||
); | ||
const NodeDescription = observer( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we still need these observers if the parent NodeSettings has the observer applied ? We shouldn't as it should detect the change and rerender the children
Closes #484