mirror of
https://github.com/apache/superset.git
synced 2026-04-22 01:24:43 +00:00
fix(sql lab): Selecting edit on a query from query history doesn't update the SQL Editor properly (#19290)
This commit is contained in:
@@ -240,6 +240,12 @@ class SqlEditor extends React.PureComponent {
|
||||
});
|
||||
}
|
||||
|
||||
componentDidUpdate() {
|
||||
if (this.props.queryEditor.sql !== this.state.sql) {
|
||||
this.onSqlChanged(this.props.queryEditor.sql);
|
||||
}
|
||||
}
|
||||
|
||||
componentWillUnmount() {
|
||||
window.removeEventListener('resize', this.handleWindowResize);
|
||||
window.removeEventListener('beforeunload', this.onBeforeUnload);
|
||||
|
||||
Reference in New Issue
Block a user