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

SOF-7051: replace SaveActionDialog with renderSaveActionDialog #143

Merged
merged 8 commits into from
Nov 8, 2023

Conversation

k0stik
Copy link
Member

@k0stik k0stik commented Oct 30, 2023

No description provided.

Copy link
Member

@VsevolodX VsevolodX left a 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}>
Copy link
Member

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 = () => {
Copy link
Member

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

@k0stik k0stik merged commit 355a58d into dev Nov 8, 2023
2 checks passed
@k0stik k0stik deleted the update/SOF-7051 branch November 8, 2023 17:27
k0stik added a commit that referenced this pull request Dec 1, 2023
SOF-7051: replace SaveActionDialog with renderSaveActionDialog
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