version 1.0.0

AutocompleteField

View on GitHub 
a short description
    No result
PropertyDescriptionDefault value
className

from SearchFieldProps

string | undefined

-

id

from SearchFieldProps

string | undefinedString(Math.random())
label

from SearchFieldProps

React.ReactNode

-

description

from SearchFieldProps

string | undefined

-

context

from SearchFieldProps

string | undefined

-

error

from SearchFieldProps

React.ReactNode

-

success

from SearchFieldProps

React.ReactNode

-

fetch check-circle

from AutocompleteProps

(query: string) => Promise<autocomplete.Result[]>

-

initialQuery

from AutocompleteProps

string | undefined

the initial query. Makes the component uncontrolled (incompatible with query)

''
onQueryChange

from AutocompleteProps

((query: string) => void) | undefined

handler called on each query change, with the new query

() => {}
onResultSelect

from AutocompleteProps

((result: autocomplete.Result) => void) | undefined

handler called on each selection change, with the selected result

() => {}
query

from AutocompleteProps

string | undefined

the current query. Makes the component controlled (incompatible with initialQuery)

''
renderResult

from AutocompleteProps

React.ComponentClass<{ result: autocomplete.Result; }, any> | React.FunctionComponent<{ result: autocomplete.Result; }> | undefined

Component to render results with. Won't be rendered if no results where fetched

({ result }) => <>{result.label}</>
renderResultExtra

from AutocompleteProps

React.ComponentClass<{ close: () => void; }, any> | React.FunctionComponent<{ close: () => void; }> | undefined

Extra component to display under results. Won't be rendered if no results where fetched

() => {}
renderNoResult

from AutocompleteProps

React.ComponentClass<{ close: () => void; }, any> | React.FunctionComponent<{ close: () => void; }> | undefined

Component to render if no results where fetched.

() => {}
height

from AutocompleteProps

number | undefined

-

value

from SearchInputProps

string | undefined

Value of the search input

-

translations

from SearchInputProps

{ clear: string; } | undefined

Translation object

-

Variants

error
a short description
    No result
this is an error message
success
a short description
    No result
this is a success message
disabled
a short description
    No result
© Ulule 2021, Built with Gatsby