Fix :: Queryname not updating in header while editing in sidebar and saving (#5881)

* fix :: queryname not updating in header while editing and saving in sidebar

* fix :: for query name update
This commit is contained in:
Kiran Ashok 2023-04-21 12:35:57 +05:30 committed by GitHub
parent 65259afeb2
commit 8017c3cea9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View file

@ -978,6 +978,7 @@ class EditorComponent extends React.Component {
return this.setState({
draftQuery: { ...this.state.draftQuery, name: newName },
renameQueryName: false,
selectedQuery: { ...this.state.selectedQuery, name: newName },
});
}
dataqueryService

View file

@ -167,6 +167,14 @@ class QueryManagerComponent extends React.Component {
);
};
componentDidUpdate(prevState) {
if (prevState?.selectedQuery?.name !== this.state?.selectedQuery?.name) {
this.setState({
queryName: this.state.selectedQuery?.name,
});
}
}
componentWillReceiveProps(nextProps) {
if (nextProps.loadingDataSources) return;
if (this.props.showQueryConfirmation && !nextProps.showQueryConfirmation) {