Ngx-Multi-Select-Dropdown
Are you struggling to find proper multiselect dropdown with checkbox and search Functionality added? If yes, This package is for you.
Installing
install package through npm i ngx-multi-select-dropdown
How to use
import it to your module-
import { NgXMultiSelectDropdownModule } from "ngx-multi-select-dropdown";
@NgModule({
imports: [NgXMultiSelectDropdownModule}
})
In component you want to use
ts-
options = [
{
id: 1,
name: "Option1",
displayName: "Option 1"
},
{
id: 2,
name: "Option2",
displayName: "Option 2"
}
]
selectedItems = [
{
id: 1,
name: "Option1",
displayName: "Option 1"
}
]
html-
<multi-select-dropdown
[options]="options"
[selectedItems]="selectedItems"
[displayName]="'displayName'"
(onSelect)="select()"
(onUnselect)="unSelect()">
Attributes-
options - List of options (Object or simple string)
selectedItems - Selected Items(In case of multi select)
selectedItem - Keeps Selected Item when Single Selection
enableSearch - Enable or Disable search(By default true);
singleSelection - Enable Single Selection(By default false);
displayName - Name of the attribute to which is keeping the value to show in List(User friendly)(By default 'name')
type - Type of items("Object" or "Simple") <br/>
If you have any suggestion or issues, you are very welcome to post it here -https://github.com/RichaKashyap/ngx-multi-select-dropdown/issues