2.2.0 • Published 7 years ago

react-search-bar v2.2.0

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

NOTE: This library is no longer under active development. Do with it as you will. If you're looking for an alternative, please use the excellent WAI-ARIA compliant react-autosuggest instead.

A general-purpose search bar, built in React. View the demo.

Development

npm start
npm run check

Props

PropTypeRequiredDescription
autoFocusbooleanIf true, focuses the input when the component loads
delaynumberThe number of milliseconds to wait after the last key stroke before calling onChange
onChangefunctionCalled when input changes
onClearfunctionCalled when suggestions should be cleared
onSearchfunction1Called when clicking the search button or enter (presumes that search button is available)
onSelectionfunctionCalled when selecting a suggestion
renderClearButtonbooleanFlag indicating whether to display the clear button
renderSearchButtonbooleanFlag indicating whether to display the search button
styleobjectStyle object
suggestionRendererfunctionFunction to custom render suggestions
suggestionsarray\Flat array of suggestions

Also accepts supported HTML attributes for the <input> element.

1 Only when renderSearchButton is true

License

MIT

2.2.0

7 years ago

2.1.1

7 years ago

2.1.0

7 years ago

2.0.3

7 years ago

2.0.2

7 years ago

2.0.1

7 years ago

2.0.0

7 years ago

1.1.4

9 years ago

1.1.3

9 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.10

9 years ago

1.0.9

9 years ago

1.0.7

9 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago