Skip to content

Commit

Permalink
Merge branch 'Upgrade-ng9' of https://github.com/GSA/sam-ui-elements
Browse files Browse the repository at this point in the history
…into Upgrade-ng9
  • Loading branch information
yerramshilpa committed Nov 9, 2020
2 parents c7fa802 + a8e7c3a commit 617921c
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export class SAMSDSAutocompleteComponent implements ControlValueAccessor {
@Input()
public service: SAMSDSAutocompleteServiceInterface;

@ViewChild("autocompleteSearch", { static: false })
@ViewChild("autocomplete", { static: false })
autocompleteSearch: SAMSDSAutocompleteSearchComponent;
constructor(private cd: ChangeDetectorRef) {}

Expand Down Expand Up @@ -103,10 +103,8 @@ export class SAMSDSAutocompleteComponent implements ControlValueAccessor {
this.model.items = value;
this.cd.markForCheck();
} else {
if (!this.model || !(this.model instanceof SAMSDSSelectedItemModel)) {
this.model = new SAMSDSSelectedItemModel();
}
this.model.items = value && value.items ? value.items : [];
const items = value && value.items ? value.items : [];
this.model = new SAMSDSSelectedItemModel(items);
this.cd.markForCheck();
}
}
Expand Down

0 comments on commit 617921c

Please sign in to comment.