问题
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