【发布时间】:2021-12-13 14:36:01
【问题描述】:
我正在使用 material-ui 自动完成 (https://mui.com/components/autocomplete/#free-solo)。
一切正常,演示在这里:https://codesandbox.io/s/0v9v9?file=/demo.tsx
默认情况下,文本输入显示 autoComplete='off' 但我想将其更改为 autoComplete='new-something' 但它不起作用并且 autoComplete='new-something' 显示为父开发属性而不是 Input
我用过这段代码
<TextField
{...params}
inputProps={{
...params.inputProps,
autoComplete: 'new-something',
}}
/>
但它不起作用。在输入中,它仍然显示 autocomplete="off" 作为输入属性。
【问题讨论】:
标签: reactjs material-ui react-material