how to avoid or disable autoComplete in text input for Redux form?

不想你离开。 提交于 2020-01-02 15:27:27

问题


i am using ReactJS and ReduxJS to construct my application .

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

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


回答1:


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.




回答2:


Seems like autoComplete="off" no longer works in Chrome. A workaround is to either set autoComplete="new-password" or a value not supported: autoComplete="something-unsupported".



来源:https://stackoverflow.com/questions/41056858/how-to-avoid-or-disable-autocomplete-in-text-input-for-redux-form

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!