我想在redux表单的Field
组件中关闭浏览器在输入字段上的自动完成功能,但是永远无法正常工作。我的代码如下。
import { Field, reduxForm } from 'redux-form/immutable';
import { TextField } from 'redux-form-material-ui';
<Field
name="username"
component={TextField}
placeholder="Username"
label="Username"
InputProps={{ autoComplete: 'off' }} // this never works even though in the DOM's element, the attribute autocomplete="off" has already been exist
required
validate={[required]}
className={classes.field}
/>
这是怎么回事?
答案 0 :(得分:0)
实际的自动完成功能将应用于mediaSession.setPlaybackState(
PlaybackStateCompat.Builder()
.setActions(
PlaybackStateCompat.ACTION_PLAY
or PlaybackStateCompat.ACTION_PAUSE
or PlaybackStateCompat.ACTION_REWIND
or PlaybackStateCompat.ACTION_FAST_FORWARD
or PlaybackStateCompat.ACTION_SEEK_TO
)
.build()
)
参数指定的基本输入。提供component
的{{1}}属性值将为您解决该问题。
autoComplete