diff --git a/src/components/_classes/list/ListComponent.js b/src/components/_classes/list/ListComponent.js index b0d26f8670..1c3ac97779 100644 --- a/src/components/_classes/list/ListComponent.js +++ b/src/components/_classes/list/ListComponent.js @@ -22,7 +22,7 @@ export default class ListComponent extends Field { get selectData() { const selectData = _.get(this.root, 'submission.metadata.selectData', {}); - return _.get(selectData, this.path) || this.component.selectData; + return _.get(selectData, this.path); } get dataReady() { diff --git a/src/components/radio/Radio.js b/src/components/radio/Radio.js index cdb15ae7d5..636970b9e2 100644 --- a/src/components/radio/Radio.js +++ b/src/components/radio/Radio.js @@ -128,6 +128,14 @@ export default class RadioComponent extends ListComponent { return _.get(listData, this.path); } + get selectMetadata() { + return super.selectData; + } + + get selectData() { + return this.selectMetadata || this.component.selectData; + } + init() { super.init(); this.templateData = {}; diff --git a/src/components/textarea/TextArea.js b/src/components/textarea/TextArea.js index ef018983bc..82204f9236 100644 --- a/src/components/textarea/TextArea.js +++ b/src/components/textarea/TextArea.js @@ -356,10 +356,10 @@ export default class TextAreaComponent extends TextFieldComponent { } /** - * Normalize values coming into updateValue. For example, depending on the configuration, string value `"true"` will be normalized to boolean `true`. - * @param {*} value - The value to normalize - * @returns {*} - Returns the normalized value - */ + * Normalize values coming into updateValue. For example, depending on the configuration, string value `"true"` will be normalized to boolean `true`. + * @param {*} value - The value to normalize + * @returns {*} - Returns the normalized value + */ normalizeValue(value) { if (this.component.multiple && Array.isArray(value)) { return value.map((singleValue) => this.normalizeSingleValue(singleValue));