react-auto-completes
v0.2.8
Published
Search input auto complete data
Downloads
5
Maintainers
Readme
ReactAutoComplelte
Auto filter data table
Installation
npm install react-auto-completes --save
Usage
inmport ReactAutoCompletes from 'react-auto-completes';
<div>
<ReactAutoCompletes
bgcolor="red" // "#f00"
txtColor="white" // "#fff"
filterName="name, value" // limit maximum 5 filed
value=''
placeholder=''
className=''
location='1'
data={[
{ name: 'one', value: 112 },
{ name: 'two', value: 511 },
{ name: 'three', value: 512 },
]}
columns={[
{title:'Name', filed: 'name'},
{title:'Value', filed: 'value'}
]}
/>
</div>
Further options
Property | Type | Default | Description
:-----------------------|:--------------|:--------------|:--------------------------------
className | string | form-control
| css class for html input
element. also is passed to children
data | array | []
|
filterName | array | ['code', 'name', '...']
| limit maximum 5
location | number | 0 | location by table column
columns | array | []
|
name | string| ReactAutoComplete
| html form prop
id | string |
| html form prop
autoFocus | boolean | false
| html autofocus prop
bgcolor | string |
| html bgcolor prop. Background tr when have a event row up/down
txtColor | string |
| html text color prop. text-color tr when have a event row up/down
placeholder | string |
| html placeholder prop
tabIndex | string |
| html tabIndex prop
disabled | boolean |
| html disabled prop
readOnly | boolean |
| html readOnly prop
onSelectData | function | onSelectData(params)
| html onSelectData prop
Contract
skype: hthanh_kg8991;
I am very happy to receive feedback from everyone. Thanks you