SearchInput 搜索输入
搜索输入框:TextInput 的搜索形态,值非空时出现清除指示器,点击即清空。
基本用法
查询词:(空)
搜索框内已有值时,右侧出现 × 清除指示器;清空后指示器消失。
与标签、软校验配合
label、labelPosition、invisibleLabel、validate 等属性沿用 TextInput 的语义。
若要“输入框 + 常驻结果列表”
本组件只是带清除能力的搜索框。若需要输入时实时展示下拉结果,请用 SearchWidget(搜索框 + 结果列表的组合)。
属性落点
与 TextInput 相同:...rest 落在根 <div> 上,写到原生 <input> 的属性走 inputProps,聚焦输入框用 inputRef。清除指示器由组件接管,因此不开放 type(恒为 search)、indicator、indicatorProps 三个属性。
API
只列出与 TextInput 的差异,其余属性见 TextInput · API。
不支持的属性:type(恒 search)、indicator / indicatorProps(指示器槽位由清除逻辑接管)。