Mattewn99 / ngx-debounce-input

A simple Angular2+ directive that adds a debounce to your input fields πŸš€

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ngx-debounce-input

A simple Angular2+ directive that adds a debounce to your input fields πŸš€

πŸ’‘ Features

  • [βœ”οΈ] Delays the start of a function call
  • [βœ”οΈ] Checks whether the current input is sitting from previously entered value

πŸš€ Installation

npm i @mattewn99/ngx-debounce-input

πŸ›  Input Properties

Name Type Default Value Description
delay number 500 This is the time between key events before a user stops typing.

Use Example:

Add the declaration to @NgModule:

import { NgxDebounceInputModule } from '@mattewn99/ngx-debounce-input';

...

@NgModule({
  imports: [
    NgxDebounceInputModule
  ]
})

Use inside your HTML template

<input ngxDebounceInput (debounce)="search($event)" [(ngModel)]="myModel">

About

A simple Angular2+ directive that adds a debounce to your input fields πŸš€

License:MIT License


Languages

Language:TypeScript 75.1%Language:JavaScript 21.4%Language:HTML 2.9%Language:SCSS 0.6%