0.0.5 • Published 3 years ago
searchable-select v0.0.5
Searchable Select
This library was generated with Angular version 11.0.4.
How to use
- Install package
npm i searchable-select
- Include in app.module.ts like below
import { SearchableSelectModule } from 'searchable-select';
imports: [..., SearchableSelectModule, ...];
- Use in a component
<lib-searchable-select
[receivedValues]="countryList"
[label]="'Geo'"
[valueKey]="'code'"
[nameKey]="'name'"
[selected]="selectedCountries"
(selectionChange)="getSelectedCountries($event)">
</lib-searchable-select>
countryList
Array of object[{code: 'IN', name: 'India'}]
label
StringvalueKey
string or numbernameKey
String - This gets used as a value to show in the listselected
Array of selected values, string or number arrayselectionChange
Change emitter with the selected values
Peer dependencies
- "@angular/common": "^11.0.4",
- "@angular/core": "^11.0.4",
- "@angular/cdk": "^11.0.2",
- "@angular/material": "^11.0.2",
- "@angular/forms": "~11.0.0",
- "@angular/flex-layout": "^11.0.0-beta.33"