Skip to content

[Bug] angular2-multiselect-dropdown : ERROR Error: ASSERTION ERROR: Stored value should never be NO_CHANGE. #12

Description

@oflegeau

Version

4.6.3

Reproduction link

CuppaLabs/angular2-multiselect-dropdown#462

Operating System

MAC OS

Device

MAC

Browser & Version

catalina

Steps to reproduce

  1. populate angular2-multiselect-dropdown from a observable with lazyLoading=false;
  2. ERROR Error: ASSERTION ERROR: Stored value should never be NO_CHANGE.

Alternative :

  1. populate angular2-multiselect-dropdown from a observable with lazyLoading=true;
  2. 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;


Solution

Additional comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions