Skip to content

Commit

Permalink
ADDON-35152: Updated default value for form components in config mode
Browse files Browse the repository at this point in the history
  • Loading branch information
dkhatri-crest committed Mar 25, 2021
1 parent c758dca commit 1787cbd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,7 @@ class BaseFormView extends PureComponent {
const temState = {};
this.entities.forEach((e) => {
const tempEntity = {};
e.defaultValue = e.defaultValue ? e.defaultValue : '';


if (props.mode === MODE_CREATE) {
tempEntity.value = typeof e.defaultValue !== 'undefined' ? e.defaultValue : null;
tempEntity.display =
Expand Down Expand Up @@ -114,6 +113,7 @@ class BaseFormView extends PureComponent {
tempEntity.disabled = false;
temState[e.field] = tempEntity;
} else if (props.mode === MODE_CONFIG) {
e.defaultValue = typeof e.defaultValue !== 'undefined' ? e.defaultValue : null;
tempEntity.value =
typeof this.currentInput[e.field] !== 'undefined'
? this.currentInput[e.field]
Expand Down

0 comments on commit 1787cbd

Please sign in to comment.