mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-05 22:38:48 +00:00
Fixes new added/deleted query doesnt update on query manager (#3001)
This commit is contained in:
parent
3ffa765ae3
commit
4f5b5ea6b8
1 changed files with 20 additions and 12 deletions
|
|
@ -393,22 +393,30 @@ class Editor extends React.Component {
|
|||
};
|
||||
|
||||
dataSourcesChanged = () => {
|
||||
this.socket.send(
|
||||
JSON.stringify({
|
||||
event: 'events',
|
||||
data: { message: 'dataSourcesChanged', appId: this.state.appId },
|
||||
})
|
||||
);
|
||||
if (this.socket instanceof WebSocket) {
|
||||
this.socket?.send(
|
||||
JSON.stringify({
|
||||
event: 'events',
|
||||
data: { message: 'dataSourcesChanged', appId: this.state.appId },
|
||||
})
|
||||
);
|
||||
} else {
|
||||
this.fetchDataSources();
|
||||
}
|
||||
};
|
||||
|
||||
dataQueriesChanged = () => {
|
||||
this.setState({ addingQuery: false }, () => {
|
||||
this.socket.send(
|
||||
JSON.stringify({
|
||||
event: 'events',
|
||||
data: { message: 'dataQueriesChanged', appId: this.state.appId },
|
||||
})
|
||||
);
|
||||
if (this.socket instanceof WebSocket) {
|
||||
this.socket?.send(
|
||||
JSON.stringify({
|
||||
event: 'events',
|
||||
data: { message: 'dataQueriesChanged', appId: this.state.appId },
|
||||
})
|
||||
);
|
||||
} else {
|
||||
this.fetchDataQueries();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue