AutoCompleteInput
This component allows you to create a custom autocomplete component.
Installation
Examples
Properties
value
string
value for the
onChange
(val: string) => void
callback on value change
options
string[]
options to auto generate the dropdown list
autoFill
() => JSX.Element
render auto complete dropdown
className
string
additional class name
isValid
boolean
indicate the if the value is valid or not
placeholder
string
placeholder
optionClassName
string
this will be used to bind the keybaord inputs. once you add the class you will be able to navigate trhough the options using arrow keys (up and down) you need to add the same classname to the options default is 'uxp-select-option-container' you can use the default class in the drop down option and you will get the default styles <div classname="uxp-select-option-container" ...> a if you pass a custom class name you need write some styles to indicate the selected items in styles (.scss file) -------------------- . { &.highlighted { background-color: #52c4c94a; color: #424242; } }
tabIndex
number
tab index. default is 0
value
value for the
string
onChange
callback on value change
(val: string) => void
options
options to auto generate the dropdown list
string[]
autoFill
render auto complete dropdown
() => JSX.Element
className
additional class name
string
isValid
indicate the if the value is valid or not
boolean
placeholder
placeholder
string
optionClassName
this will be used to bind the keybaord inputs. once you add the class you will be able to navigate trhough the options using arrow keys (up and down) you need to add the same classname to the options
default is 'uxp-select-option-container' you can use the default class in the drop down option and you will get the default styles
a
if you pass a custom class name you need write some styles to indicate the selected items
in styles (.scss file)
. { &.highlighted { background-color: #52c4c94a; color: #424242; } }
string
tabIndex
tab index. default is 0
number
Last updated