mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 17:08:34 +00:00
To perform an action immediately after setting state on a state variable and then returning a result, a callback will be useful. (#1229)
* Update Editor.jsx * fixed typo
This commit is contained in:
parent
a27d603ea3
commit
1f1cd70175
1 changed files with 2 additions and 2 deletions
|
|
@ -462,7 +462,7 @@ class Editor extends React.Component {
|
|||
};
|
||||
|
||||
toggleQueryEditor = () => {
|
||||
this.setState({ showQueryEditor: !this.state.showQueryEditor });
|
||||
this.setState((prev) => ({ showQueryEditor: !prev.showQueryEditor }));
|
||||
this.toolTipRefHide.current.style.display = this.state.showQueryEditor ? 'none' : 'flex';
|
||||
this.toolTipRefShow.current.style.display = this.state.showQueryEditor ? 'flex' : 'none';
|
||||
};
|
||||
|
|
@ -490,7 +490,7 @@ class Editor extends React.Component {
|
|||
};
|
||||
|
||||
toggleQuerySearch = () => {
|
||||
this.setState({ showQuerySearchField: !this.state.showQuerySearchField });
|
||||
this.setState((prev) => ({ showQuerySearchField: !prev.showQuerySearchField }));
|
||||
};
|
||||
|
||||
onVersionDeploy = (versionId) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue