[ADF-5013] Dropdown does not display the default value

This commit is contained in:
dhrn
2019-11-21 19:53:54 +05:30
parent c61de922af
commit a18d21615d
2 changed files with 0 additions and 5 deletions

View File

@@ -6,7 +6,6 @@
[id]="field.id"
[(ngModel)]="field.value"
[disabled]="field.readOnly"
[compareWith]="compareDropdownValues"
(ngModelChange)="onFieldChanged(field)">
<mat-option *ngFor="let opt of field.options"
[value]="getOptionValue(opt, field.value)"

View File

@@ -82,10 +82,6 @@ export class DropdownCloudWidgetComponent extends WidgetComponent implements OnI
});
}
compareDropdownValues(opt1: string, opt2: FormFieldOption): boolean {
return opt1 && opt2 && ( opt1 === opt2.id || opt1 === opt2.name);
}
getOptionValue(option: FormFieldOption, fieldValue: string): string {
let optionValue: string = '';
if (option.id === 'empty' || option.name !== fieldValue) {