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 = () => {
|
dataSourcesChanged = () => {
|
||||||
this.socket.send(
|
if (this.socket instanceof WebSocket) {
|
||||||
JSON.stringify({
|
this.socket?.send(
|
||||||
event: 'events',
|
JSON.stringify({
|
||||||
data: { message: 'dataSourcesChanged', appId: this.state.appId },
|
event: 'events',
|
||||||
})
|
data: { message: 'dataSourcesChanged', appId: this.state.appId },
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.fetchDataSources();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
dataQueriesChanged = () => {
|
dataQueriesChanged = () => {
|
||||||
this.setState({ addingQuery: false }, () => {
|
this.setState({ addingQuery: false }, () => {
|
||||||
this.socket.send(
|
if (this.socket instanceof WebSocket) {
|
||||||
JSON.stringify({
|
this.socket?.send(
|
||||||
event: 'events',
|
JSON.stringify({
|
||||||
data: { message: 'dataQueriesChanged', appId: this.state.appId },
|
event: 'events',
|
||||||
})
|
data: { message: 'dataQueriesChanged', appId: this.state.appId },
|
||||||
);
|
})
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.fetchDataQueries();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue