angular2-multiselect-dropdown
angular2-multiselect-dropdown copied to clipboard
Not able to add new value when data not available; Add button is not visible
html---- <angular2-multiselect [data]="itemList" [(ngModel)]="selectedItems" [settings]="settings" (onSelect)="onItemSelect($event)" (onDeSelect)="OnItemDeSelect($event)" (onSelectAll)="onSelectAll($event)" (onDeSelectAll)="onDeSelectAll($event)" (onAddFilterNewItem)="onAddItem($event)">
.ts file-------- this.settings = { singleSelection: true, text: "Select Countries", selectAllText: 'Select All', unSelectAllText: 'UnSelect All', enableSearchFilter: true, addNewItemOnFilter: true, addNewButtonText:'Add', noDataLabel:'NO DATA FOUND', enableCheckAll:true //position:'top' }; onAddItem(data:string){ this.count++; this.itemList.push({"id": this.count,"itemName":data,"name":data}); this.selectedItems.push({"id": this.count,"itemName":data,"name":data}); }
Any update on this?
I wanna show "Add button" by default (create my own list instead of select items) , we need force any state or method ?
Not able to enable the Add button even after making it true.How to resolve this issue ?@CuppaLabs
@CuppaLabs any update on this ?