Skip to content

Commit

Permalink
First Commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Pankaj-Sati committed Oct 30, 2020
0 parents commit 632469f
Show file tree
Hide file tree
Showing 17 changed files with 357 additions and 0 deletions.
50 changes: 50 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Ion Select Search
Adds input search functionality to <ion-select> component
This library was generated with [Angular CLI](https://github.com/angular/angular-cli)

## Installation

Run `npm i ion-select-search --save` to install this library.

## Features

1. Adds an input element in ion-select for easy searching among the list hundreds of records
2. Just add a directive `idlDefault` to existing <ion-select> to enable searching

## Usage

After installing this package with `npm i ion-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 { }`

## Enable searching in <ion-select>

Use the directive `idlDefault` inside an <ion-select>

Note:`To avoid loading all the emojies again and again, don't use *ngIf to show/hide the emoji picker. Instead, set the height of cantainer to 0px for hiding the component.`

Example:
Inside your .html file
```html<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>
```

## Further help

For any questions, please raise an issue in the github repository https://github.com/Pankaj-Sati/IonSelectSearch.git
96 changes: 96 additions & 0 deletions bundles/ion-select-search-lib.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bundles/ion-select-search-lib.umd.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions bundles/ion-select-search-lib.umd.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions bundles/ion-select-search-lib.umd.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions esm2015/ion-select-search-lib.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 632469f

Please sign in to comment.