mayurnewase commented on a change in pull request #11946:
URL:
https://github.com/apache/incubator-superset/pull/11946#discussion_r539433926
##########
File path: superset-frontend/src/explore/components/AdhocMetricEditPopover.jsx
##########
@@ -100,10 +100,13 @@ export default class AdhocMetricEditPopover extends
React.Component {
}
onSave() {
- // unset isNew here in case save button was clicked when no changes were
made
+ if (this.props.title.hasCustomLabel) {
+ this.state.adhocMetric.label = this.props.title.label;
+ this.state.adhocMetric.hasCustomLabel = true;
+ }
Review comment:
Ok.
Sorry, I am a bit new to these jsx conventions. Could you specify the rule
which suggests avoiding mutating states?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]