Skip to content

Commit

Permalink
fix(admin-ui): Fix incorrect type when dealing with numeric value in …
Browse files Browse the repository at this point in the history
…list (#3094)

Fixes #3093
  • Loading branch information
jyling authored Nov 8, 2024
1 parent 61d808b commit 76d66c6
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ export class DynamicFormInputComponent
if (this.listItems) {
for (const item of this.listItems) {
if (item.componentRef) {
const { value } = item.control;
const { type } = item.componentRef.instance.config || {};
// fix a bug where the list item of string turns into number which lead to unexpected behavior
if (typeof value === 'number' && type === 'string') {
item.control.setValue(item.control.value.toString(), { emitEvent: false });
}
this.updateBindings(changes, item.componentRef);
}
}
Expand Down

0 comments on commit 76d66c6

Please sign in to comment.