Skip to content

Commit

Permalink
Show the value of choice field on DList
Browse files Browse the repository at this point in the history
  • Loading branch information
adamPrestor committed Sep 15, 2023
1 parent cacc682 commit 680bc16
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,6 @@ class ConsumerLogicArray extends ConsumerLogicBase implements APIConsumer.Consum
record = { ...this.formData };
this.records.push(record);
}
// this loop will fill any resolved display fields into the table record so that resolved names may be displayed
this.tableColumns.forEach((column) => {
if (column.name.endsWith('-display') && this.formData['$extra-data'][column.name]) {
record[column.name] = this.formData['$extra-data'][column.name];
}
});
if (refresh) {
await this.reload();
}
Expand Down
2 changes: 1 addition & 1 deletion vue/dynamicforms/src/components/form/field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export default /* #__PURE__ */ defineComponent({
methods: {
updateModelValueDisplay(newValue: any) {
const fieldName = `${this.field.name}-display`;
if (Object.getOwnPropertyDescriptor(this.payload, fieldName)?.writable) {
if (this.payload[fieldName] === undefined || Object.getOwnPropertyDescriptor(this.payload, fieldName)?.writable) {
this.payload[fieldName] = newValue;
}
},
Expand Down

0 comments on commit 680bc16

Please sign in to comment.