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

fix(Explore): Remove changes to the properties on cancel #17184

Merged
merged 6 commits into from
Nov 2, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions superset-frontend/src/explore/components/ExploreChartHeader.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,14 @@ export class ExploreChartHeader extends React.PureComponent {
showTooltip
/>
)}
<PropertiesModal
show={this.state.isPropertiesModalOpen}
onHide={this.closePropertiesModal}
onSave={this.props.sliceUpdated}
slice={this.props.slice}
/>
{this.state.isPropertiesModalOpen && (
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if using destroyOnClose would change anything in terms of performance or use of resources.

Copy link
Member Author

Choose a reason for hiding this comment

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

That's a good catch. However, it does not seem to solve the problem so I'll have to stick with this approach

<PropertiesModal
show={this.state.isPropertiesModalOpen}
onHide={this.closePropertiesModal}
onSave={this.props.sliceUpdated}
slice={this.props.slice}
/>
)}
<Tooltip
id="edit-desc-tooltip"
title={t('Edit chart properties')}
Expand Down