CuppaLabs / angular2-multiselect-dropdown

Angular 2 Dropdown Multiselect
https://cuppalabs.github.io/angular2-multiselect-dropdown
MIT License
289 stars 256 forks source link

Not able to add new value when data not available; Add button is not visible #343

Open dharmendrap7 opened 5 years ago

dharmendrap7 commented 5 years ago

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}); }

manik-biradar007 commented 5 years ago

Any update on this?

mariobustosjmz commented 5 years ago

I wanna show "Add button" by default (create my own list instead of select items) , we need force any state or method ?

shailendra-bhargava commented 5 years ago

Not able to enable the Add button even after making it true.How to resolve this issue ?@CuppaLabs

gethari commented 4 years ago

@CuppaLabs any update on this ?