Constructor
# <SearchBox initValue placeholder className formRef inputClassName inputId template onSubmitHandler onEscape navigateTo />
This component provides a form with a search text box. On submit, the user is redirected to the search page via AJAX.
A template function can also be passed in, to do custom rendering. The template prop will be called with childen having the child text box.
Example
import { SearchBox } from '@quintype/components';
<SearchBox className="foobar" placeholder="search" inputClassName="foobar-box" inputId="stg" inputRef={(x) => this.foo = x} onEscape={() => this.closeDialog()}/>
PropTypes:
Name | Type | Required | Description | Default |
---|---|---|---|---|
initValue |
string | No | ||
placeholder |
string | No | ||
className |
string | No | ||
formRef |
any | No | ||
inputClassName |
string | No | ||
inputId |
string | No | ||
template |
element | No | ||
onSubmitHandler |
func | No | ||
onEscape |
func | No | ||
navigateTo |
func | No |