mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5013] Dropdown does not display the default value
This commit is contained in:
@@ -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)"
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user