【发布时间】:2019-12-01 15:29:21
【问题描述】:
我正在使用 material-ui 的自动完成功能,并尝试在单击按钮时删除选定的值,但找不到任何方法来做到这一点。有什么想法吗?
<Autocomplete
className={classes.techListBox}
disableCloseOnSelect={true}
multiple
options={this.props.displayProject.techList}
getOptionLabel={options => options.title}
defaultValue={this.props.displayProject.techName}
onChange={(e, techs) => {
this.formatTechID(techs);
}}
renderInput={params => (
<TextField
{...params}
variant="outlined"
placeholder={t("tech")}
margin="normal"
fullWidth
/>
)}
></Autocomplete>```
【问题讨论】:
标签: reactjs material-ui