2.2.1 • Published 7 years ago

revised-react-input-box-done-typing v2.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

react-input-box-done-typing

A React component that triggers a callback when the user has finished typing in the input text box

Usage

Install via npm using the following npm command:

npm i -S react-input-box-done-typing

Include the component within your React application:

import InputBoxDoneTyping from 'react-input-box-done-typing';

And use it inside your container:

<InputBoxDoneTyping
  id="input-box-done-typing"
  className="form-control"
  placeholder="Start typing ..."
  maxLength={20}
  defaultValue="lon"
  autoComplete="on"
  onChange={(value) => { console.log('onChange:', value); } }
  doneTyping={(value) => { console.log('doneTyping:', value); } }
  doneTypingInterval={2000}
  />

Attributes

NameTypeRequiredDefaultOptions
idstringno--
classNamestringno--
placeholderstringno--
maxLengthnumberno--
defaultValuestringno--
autoCompletestringnoon'on', 'off'
onChangefunctionno--
doneTypingfunctionyes--
doneTypingIntervalnumberno500 (milliseconds)-

Demo

Clone or download this GitHub repository then run a live demo using the following npm commands:

npm i
npm run demo

The script will automatically open a tab of your default browser; you will be able to see the InputBoxDoneTyping component in action

alt text