16.0.0 • Published 6 months ago

ngm-live-search v16.0.0

Weekly downloads
-
License
-
Repository
github
Last release
6 months ago

NgmLiveSearch

This library was generated with Angular CLI version 13.2.0.

Demo

https://stackblitz.com/edit/angular-ivy-kdr5j4?file=src/app/app.component.html

Installation

Install npm i ngm-live-search with npm

  cd my-project
  npm i npm i ngm-live-search

Usage/Examples

import { NgmLiveSearchModule } from "ngm-live-search";

@NgModule({
  imports: [
    .
    .
    .
    NgmLiveSearchModule
  ],
})
export class AppModule {}

Then in your component.html

<ngm-live-search (search)="yourSearch($event)" (searchClosed)="clearSearch()">
</ngm-live-search>

Then in your component.ts

export class YourComponent {
  /**
   * @params text: the text to search.
   */
  yourSearch(text: string) {
    // Call api or search locally on your data.
    // this.callApi() In case of call api.
    // this.localSearch() In case of local search.
  }

  clearSearch() {
    // Stop filtering your data
  }

  callApi() {}

  localSearch() {}
}

API Reference

Inputs

ParameterTypeDescription
configISearchParamsdebounceTime, minLength, clearOnBlur

Outputs

ParameterTypeDescription
searchstringReturns the string to search
searchClosedstringon click on x button
15.0.0

6 months ago

14.0.0

6 months ago

16.0.0

6 months ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago