|
|
@@ -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);
|
|
|
}
|
|
|
}
|