mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
[Bugfix] On dispatching Undo ⌘Z or Redo ⌘+shift+Z actions to a component on the editor should also update the internal state or props for the children. (#2826)
* fixes currentState should receive updates on appDefinations gets a new update [undo] * update the internal state or props for the children.
This commit is contained in:
parent
18ee640496
commit
175820ea31
1 changed files with 7 additions and 0 deletions
|
|
@ -144,6 +144,12 @@ class Editor extends React.Component {
|
|||
});
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps, prevState) {
|
||||
if (prevState.appDefinition !== this.state.appDefinition) {
|
||||
computeComponentState(this, this.state.appDefinition.components);
|
||||
}
|
||||
}
|
||||
|
||||
isVersionReleased = (version = this.state.editingVersion) => {
|
||||
if (isEmpty(version)) {
|
||||
return false;
|
||||
|
|
@ -500,6 +506,7 @@ class Editor extends React.Component {
|
|||
this.handleAddPatch
|
||||
);
|
||||
setStateAsync(_self, newDefinition).then(() => {
|
||||
computeComponentState(_self, _self.state.appDefinition.components);
|
||||
this.autoSave();
|
||||
});
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue