ReactAutocomplete
An autocomplete-dropdown component for react.js. Based on Bootstrap for styling.
Supports selection using keyboard and mouse.
Usage
bower install react-autocomplete- Include
dist/react-autocomplete.min.jsanddist/react-autocomplete.min.cssin your page. - Do something like:
<Autocomplete
select={itemSelected}
displayAttribute='beerName'
autocompleteSearch={autocompleteSearch}/>
}
- where:
selectis the callback function when the user selects an elementdisplayAttributeis the attribute of each result to display in the listautocompleteSearchis the search function: takes values (POJO) and callback function, callback expects to be called with an array of POJOSextraParamsis an optional POJO with extra attributes to the autocompleteSearch function
- see index.html for example usage