React Dropdown AutoComplete
Example
Component { const editFields = thisstate; // you can get your input value by other ways const product = thisprops; // get data where you have, or combine from redux return <ReactDropDownAutoComplete = ="form-control" ="name" ="name" ="Product Name" = = ="search" ="#ff000" = = = = /> ; }
Data Seclection
You can use these ways to select value
- Type the whole correct value
- Mouse click the value
- Press
arrow up/down
to change selection and pressenter or arrow right
to select value
Params
- getItemValue
- required
- get value in single item
- renderItem
-
optional
-
custom list menu item you want to show
-
onClick
- bind menu item onClick method
-
- className
- optional
- id
- optional
- is the key for the list render
- name
- optional
- the name of the input field
- placeholder
- optional
- the placeholder of the input field
- data
- required
- your data list
- must be array
- default: []
- value
- required
- value for auto-complete field check with old value
- onChange
- optional
- get value from autocomplete field as params in func
- onEnter
- optional
- do what ever you want after press enter key
- icon
- optional
- icon for the input at the right side
- only support font-awesome
- iconColor
- optional
- the icon color
- support format: HEX, RGB, RGBA
- iconClick
- optional
- do what ever you want after click the icon