mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-23 08:58:26 +00:00
Use createref in Editor component properly (#1227)
- Prettify editor component
This commit is contained in:
parent
1f1cd70175
commit
3c1dc290e8
1 changed files with 5 additions and 6 deletions
|
|
@ -310,7 +310,6 @@ class Editor extends React.Component {
|
|||
};
|
||||
|
||||
saveAppName = (id, name, notify = false) => {
|
||||
|
||||
if (!name.trim()) {
|
||||
toast.warn("App name can't be empty or whitespace", {
|
||||
hideProgressBar: true,
|
||||
|
|
@ -319,12 +318,12 @@ class Editor extends React.Component {
|
|||
|
||||
this.setState({
|
||||
app: { ...this.state.app, name: this.state.oldName },
|
||||
})
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
this.saveApp(id, {name}, notify);
|
||||
}
|
||||
this.saveApp(id, { name }, notify);
|
||||
};
|
||||
|
||||
renderDataSource = (dataSource) => {
|
||||
const sourceMeta = DataSourceTypes.find((source) => source.kind === dataSource.kind);
|
||||
|
|
@ -508,8 +507,8 @@ class Editor extends React.Component {
|
|||
});
|
||||
};
|
||||
|
||||
toolTipRefHide = createRef(null);
|
||||
toolTipRefShow = createRef(null);
|
||||
toolTipRefHide = createRef();
|
||||
toolTipRefShow = createRef();
|
||||
|
||||
render() {
|
||||
const {
|
||||
|
|
|
|||
Loading…
Reference in a new issue