mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
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:
parent
65259afeb2
commit
8017c3cea9
2 changed files with 9 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue