Adds input search functionality to <ion-select>
component
This library was generated with Angular CLI
Run npm i ionic-select-search --save
to install this library.
- Adds an input element in ion-select for easy searching among the list hundreds of records
- Just add a directive
idlDefault
to existing<ion-select>
to enable searching
After installing this package with npm i ionic-select-search --save
, import the IonSelectSearchLibModule in your main module(app.module.ts) or your lazy-loaded module.
Eg: inside home.module.ts:
` import { IonSelectSearchLibModule } from 'ion-select-search';
@NgModule({
...
imports: [
IonSelectSearchLibModule //Import the main module
],
...
})
export class HomeModule { }`
Use the directive idlDefault
inside an <ion-select>
Note:Currently interface are not supported. Work on "popover" and "action-sheet" interface is in progress. I will update the documents once done.
Example: Inside your .html file
<ion-select idlDefault [(ngModel)]="myCategory">
<ion-select-option value="1">Fruits</ion-select-option>
<ion-select-option value="2">Vegies</ion-select-option>
<ion-select-option value="3">Drinks</ion-select-option>
<ion-select-option value="4">Cakes</ion-select-option>
<ion-select-option value="5">Pulses</ion-select-option>
<ion-select-option value="6">Dairy</ion-select-option>
</ion-select>
For any questions, please raise an issue in the github repository https://github.com/Pankaj-Sati/IonSelectSearch.git