Skip to content
This repository has been archived by the owner on Jul 19, 2019. It is now read-only.

Unable to set autoComplete prop on input #354

Open
daveaspinall opened this issue Sep 4, 2018 · 2 comments
Open

Unable to set autoComplete prop on input #354

daveaspinall opened this issue Sep 4, 2018 · 2 comments

Comments

@daveaspinall
Copy link

I'd like to be able to define the value of the autoComplete prop added to the input to improve the autofill feature, and in some cases disable it.

Should adding the autoComplete prop overwrite the default autoComplete: 'off' value?

Chrome ignores the "off" value.

@peterlcullen
Copy link

You can use the renderInput prop to override this. Here's an example...

<Autocomplete
  // .... all the props you would normally use 
  items={items}
  renderItem={itemRenderer}
  
  // then add this, so you can override `autoComplete`
  renderInput={props => {
    return <input {...props} autoComplete="whatever-you-want" />;
  }}
/>

@mousemke
Copy link

mousemke commented Dec 10, 2018

chrome has changed and no longer respects the off that is the current default and should be set to new password as default (and hopefully accept props anyway if ppl want to change it. there is even a fix PR open. Any hope of these being merged.

(yes i realize there is a work around, but it is fixed.... just waiting to merge)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants