Skip to content

Commit

Permalink
Bindu, Tarun | MOBN-1551 | Refactor code and fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunkumar-tw committed Jan 20, 2021
1 parent ca1d1d9 commit ecaea67
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/components/Container.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,12 @@ export class Container extends addMoreDecorator(Component) {
...previousState,
data: previousState.data.update(formFieldPath, value, errors),
collapse: undefined,
}), () => { onActionDone(); this.onValueUpdated(); });
}), () => {
if (onActionDone) {
onActionDone();
}
this.onValueUpdated();
});
}

onValueUpdated() {
Expand Down Expand Up @@ -210,10 +215,10 @@ Container.propTypes = {
version: PropTypes.string.isRequired,
}),
observations: PropTypes.array.isRequired,
onValueUpdated: PropTypes.func,
patient: PropTypes.object.isRequired,
translations: PropTypes.object.isRequired,
validate: PropTypes.bool.isRequired,
validateForm: PropTypes.bool.isRequired,
onValueUpdated: PropTypes.func,
};

0 comments on commit ecaea67

Please sign in to comment.