hughhhh commented on code in PR #20852:
URL: https://github.com/apache/superset/pull/20852#discussion_r929132309
##########
superset-frontend/src/components/Chart/Chart.jsx:
##########
@@ -296,27 +306,39 @@ class Chart extends React.PureComponent {
}
return (
- <ErrorBoundary
- onError={this.handleRenderContainerFailure}
- showMessage={false}
- >
- <Styles
- data-ui-anchor="chart"
- className="chart-container"
- data-test="chart-container"
- height={height}
- width={width}
+ <>
+ <ErrorBoundary
+ onError={this.handleRenderContainerFailure}
+ showMessage={false}
>
- <div className="slice_container" data-test="slice-container">
- <ChartRenderer
- {...this.props}
- source={this.props.dashboardId ? 'dashboard' : 'explore'}
- data-test={this.props.vizType}
- />
- </div>
- {isLoading && !isDeactivatedViz && <Loading />}
- </Styles>
- </ErrorBoundary>
+ <Styles
+ data-ui-anchor="chart"
+ className="chart-container"
+ data-test="chart-container"
+ height={height}
+ width={width}
+ >
+ <div className="slice_container" data-test="slice-container">
+ <ChartRenderer
+ {...this.props}
+ source={this.props.dashboardId ? 'dashboard' : 'explore'}
+ data-test={this.props.vizType}
+ />
+ </div>
+ {isLoading && !isDeactivatedViz && <Loading />}
+ </Styles>
+ </ErrorBoundary>
+ {showSaveDatasetModal && (
+ <SaveDatasetModal
+ key={Math.random()}
Review Comment:
why are we doing a `Math.random()` here for the key? couldn't we just set it
as specific value?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]