-
Notifications
You must be signed in to change notification settings - Fork 11
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
SOF-7051: replace SaveActionDialog with renderSaveActionDialog #143
Conversation
f0e7bc7
to
2669694
Compare
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.
Verified that imports work in standalone mode as previously.
disabled={!SaveActionDialog} | ||
onClick={() => this.setState({ showSaveMaterialsDialog: true })} | ||
> | ||
<MenuItem disabled={!openSaveActionDialog} onClick={this.renderSaveActionDialog}> |
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 main idea I'm getting here is that you've changed rendering of the dialogs to happen only on call, not at every render of the parent component. So dialogs don't get mounted if not needed.
/> | ||
) : null; | ||
} | ||
renderSaveActionDialog = () => { |
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.
Makes sense. Here the is provided in the openSaveactionDialog from the parent component in Web-App
SOF-7051: replace SaveActionDialog with renderSaveActionDialog
No description provided.