Skip success toast and saving flag on editable panel save.
This commit is contained in:
@@ -106,15 +106,13 @@ class EditablePanelTileBase extends Component {
|
|||||||
|
|
||||||
const { onSave } = this.props;
|
const { onSave } = this.props;
|
||||||
const { draft } = this.state;
|
const { draft } = this.state;
|
||||||
this.setState({ saving: true, error: null });
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await onSave(draft);
|
await onSave(draft);
|
||||||
this.setState({ editing: false, draft: null, saving: false, error: null });
|
this.setState({ editing: false, draft: null, saving: false, error: null });
|
||||||
enqueueSnackbar('Gespeichert.', { variant: 'success' });
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const normalized = notifyError(err);
|
const normalized = notifyError(err);
|
||||||
this.setState({ saving: false, error: normalized.message });
|
this.setState({ error: normalized.message });
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user