Is there a way I can control attributes on input field?
Anything passed into inputProps will be propagated to the input element.
Actually that didn't worked.
Instead this worked perfectl,
saveInputRef: function(autosuggest) {
this.inputRef = autosuggest && autosuggest.input;
if (this.inputRef) this.inputRef.spellcheck = false;
}
<Autosuggest ...... ref={this.saveInputRef} />
@sushant711 Are you sure that adding spellCheck: false (note the capital C) to inputProps doesn't work? spellCheck is listed in the supported attributes in the docs.
@moroshko Ah, capital C worked. I should have referred documentation properly. My bad. Thanks for a clear simple solution and thanks for building this awesome library. I tried react-select and many more. None of them had a satisfactory API contract. react-autosuggest has a very minimal yet sufficient contract :)
Thanks @sushant711 :+1:
Most helpful comment
@sushant711 Are you sure that adding
spellCheck: false(note the capital C) toinputPropsdoesn't work?spellCheckis listed in the supported attributes in the docs.