继承
InputBase
用法
<SearchBox
style={{ width: 300 }}
placeholder="Input something here"
value={value}
onSearch={this.handleSearch.bind(this)}
addonRight={() => (
<span className="textbox-icon icon-clear" title="Clear value" onClick={this.handleClear.bind(this)}></span>
)}
/>
属性
名称 |
类型 |
描述 |
默认 |
value |
string |
字段值 |
null |
category |
string |
从菜单项值检索出搜索类别值。 |
null |
categories |
array |
搜索类别条项。 |
[] |
menuAlign |
string |
菜单对齐方式,可选的值: 'left','right'。 |
left |
buttonAlign |
string |
搜索按钮对齐方式,可选的值: 'left','right'。 |
right |
buttonIconCls |
string |
搜索按钮图标样式类。 |
icon-search |
事件
名称 |
参数 |
描述 |
onSearch |
{value, category} |
搜索时触发。 |