Search

Install

import {InputSearch} from '@xsolla/uikit'

Examples

Usage

<InputSearch name="search"
             input={{
               value: null,
               onChange: this.onChange
             }}
             request={this.request}
             options={options}
             placeholder="Search..."/>

Options example

options = response => response.map(item => ({
  label: item.name,
  onClick: () => void 0
}));

API

PropertyDescriptionTypeDefault
nameinput namestringnull
inputconfig for redux-form or basic inputobject{}
metameta for redux-form or basic inputobject{touched: false, error: null}
requestrequest for searchpromiserequired
optionsfunction that returns array of objects for dropdown componentfuncrequired
delaydelay between typing and requestnumber400
sizecan be set to xs, sm, mdstringxs
placeholderplaceholder for search inputstring