I'm using autocomplete of material-ui, and trying to delete selected value whenever click a button but can not find any way to do that.
(我正在使用material-ui的自动完成功能,并试图在单击按钮时删除选定的值,但找不到任何方法。)
Any idea? (任何的想法?)
<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>```
ask by randomguy translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…