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

 #2287 Fixed Common properties callbacks don't update on re-render #2288

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

nmgokhale
Copy link
Member

Fixes: #2287

Use this code to reproduce the issue - samueldmeyer@cdd1af1

Screen.Recording.2024-12-26.at.2.53.38.PM.mov

Developer's Certificate of Origin 1.1

   By making a contribution to this project, I certify that:

   (a) The contribution was created in whole or in part by me and I
       have the right to submit it under the Apache License 2.0; or

   (b) The contribution is based upon previous work that, to the best
       of my knowledge, is covered under an appropriate open source
       license and I have the right under that license to submit that
       work with modifications, whether created in whole or in part
       by me, under the same open source license (unless I am
       permitted to submit under a different license), as indicated
       in the file; or

   (c) The contribution was provided directly to me by some other
       person who certified (a), (b) or (c) and I have not modified
       it.

   (d) I understand and agree that this project and the contribution
       are public and that a record of the contribution (including all
       personal information I submit with it, including my sign-off) is
       maintained indefinitely and may be redistributed consistent with
       this project or the open source license(s) involved.

@nmgokhale nmgokhale self-assigned this Dec 26, 2024
@@ -141,6 +141,22 @@ class PropertiesMain extends React.Component {
}
}

componentDidUpdate(prevProps) {
if (!isEqual(prevProps.callbacks, this.props.callbacks)) {
this.propertiesController.setHandlers({
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we create a new setCallbacks method that does this for both here and in the constructor? That way when a new callback is added we only need to update 1 place.

@nmgokhale nmgokhale force-pushed the update-callbacks-on-re-render branch from 41f7aa0 to d13ea59 Compare January 3, 2025 18:52
Copy link
Member

@matthoward366 matthoward366 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nmgokhale nmgokhale merged commit c4b5827 into elyra-ai:main Jan 3, 2025
3 checks passed
@nmgokhale nmgokhale deleted the update-callbacks-on-re-render branch January 3, 2025 20:21
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.

Common properties callbacks don't update on re-render
2 participants