-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Version
4.6.3
Reproduction link
CuppaLabs/angular2-multiselect-dropdown#462
Operating System
MAC OS
Device
MAC
Browser & Version
catalina
Steps to reproduce
- populate angular2-multiselect-dropdown from a observable with lazyLoading=false;
- ERROR Error: ASSERTION ERROR: Stored value should never be NO_CHANGE.
Alternative :
- populate angular2-multiselect-dropdown from a observable with lazyLoading=true;
- works but impossible to use the search fonction enableSearchFilter: true,
What is expected?
populate angular2-multiselect-dropdown with observable (subscription in OnInit like this :
settings2 = {
singleSelection: true,
text: 'Clients',
classes: 'selectpicker btn-danger',
lazyLoading: falseIfMissing('kk'),
enableSearchFilter: true,
maxHeight: 300
};
sortedItemsClients= [];
searchValueClient ='';
clientNames: ClientName[];
private subClients: Subscription;
this.subClients = this.clientNameListService.obs_getList().subscribe(data => {
if (data) {
this.clientNames = data;
this.sortedItemsClients.splice(0, this.sortedItemsClients.length);
if (this.clientNames !== null) {
this.clientNames.forEach(item => {
this.sortedItemsClients.push({id: item.id, itemName: item.name});
});
}
}
});
and HTML:
<angular2-multiselect
[data]="sortedItemsClients"
[settings]="settings2"
[(ngModel)]="searchValueClient"
>
What is actually happening?
ERROR Error: ASSERTION ERROR: if lazyLoading=false;
NO Search if lazyLoading=true;