问题描述
我正在将material-ui / autoComplete与reactjs一起使用。 在单个区域中搜索。如何使其搜索多个域。
所以我也想添加customerSurname字段。
在customerName字段上搜索。如何搜索CustomerSurname和customerIdentityNo字段?
<Autocomplete
id={'customer-search'}
options={this.state.customerItems}
getOptionLabel={(option) => option.customerName}
renderOption={(option) => (
<React.Fragment>
<span> {option.customerIdentityNo},</span>
<span> {option.customerName} {option.customerSurname} </span>
</React.Fragment>
)}
renderInput={(params) => (
<TextField
{...params}
label="Search input"
margin="normal"
variant="outlined"
InputProps={{
...params.InputProps,type: 'search'
}}
/>
)}
/>
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)