UNPKG

react-ui-query-selector

Version:
43 lines (31 loc) 798 B
# react-ui-query-selector Query selector react component ## How to install ``` npm i react-ui-query-selector --save ``` Then import the component and css ``` import { QuerySelector, QSItem } from 'react-ui-query-selector'; import 'react-ui-query-selector/lib/css/main.css'; render() { const { items } = this.state; return ( <QuerySelector items={items} scrolledDown={this.onScrolledDown} scrolledUp={this.onScrolledUp} selectItem={this.onSelectItem} loadItems={this.loadItems} minLengthQuery={2} autofocus={true} debounce={300} /> ); } ``` ## How it looks like ![Alt text](https://user-images.githubusercontent.com/5961589/35771108-b3a747d4-0927-11e8-9052-1a2eda816f14.png) ## Dependencies * Rxjs: ^5.5.6 * Bootstrap: ^4.0.0