Fix for bug that causes overwritten app state

This commit is contained in:
navaneeth 2021-05-17 15:18:32 +05:30
parent 84069b431a
commit 7d74dc2426

View file

@ -96,18 +96,20 @@ function executeAction(_ref, event) {
const modalId = event.options.modal;
const modalMeta = _ref.state.appDefinition.components[modalId];
_ref.setState({
const newState = {
currentState: {
..._ref.state.currentState,
components: {
..._ref.state.currentState,
..._ref.state.currentState.components,
[modalMeta.component.name]: {
..._ref.state.currentState.components[modalMeta.component.name],
show: true
}
}
}
})
}
_ref.setState(newState)
}
}
}