如何在 Redux 表单的文本输入中避免或禁用自动完成? [英] how to avoid or disable autoComplete in text input for Redux form?

查看:23
本文介绍了如何在 Redux 表单的文本输入中避免或禁用自动完成?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ReactJS 和 ReduxJS 来构建我的应用程序.

我使用 Redux-Form 创建了我的表单,并且有许多文本输入,对于其中之一,我使用 onkeyDown 事件来增加和减少文本中的数字

I created my form using Redux-Form and there are many text input and for one of them ,i am using onkeyDown event to increase and decrease number in my text

所以当我点击向上箭头或输入第一个数字时,文本是自动的完成前一个日期输入(历史),当我打扰点击另一个向上箭头

so when i click up arrow or enter first digit the text is auto completed with previous date entered(history) that disturb when i click another up arrow

[提示] 我试过 AutoComplete=off 但没有用

[Hint] I tried AutoComplete=off and did not work

推荐答案

您只是将属性大小写不正确.您可以在输入中使用以下 3 个属性:

You just have the attribute cased incorrectly. You can use the following 3 attributes on the input:

autoComplete="off"
autoCorrect="off"
spellCheck="off"

请注意,每个都是驼峰式的.

Notice that each are camel case.

这篇关于如何在 Redux 表单的文本输入中避免或禁用自动完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆