-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/react select autocomplete off #144
Conversation
78a610b
to
5bb4d1b
Compare
packages/ui/src/SelectField.tsx
Outdated
const Input = (props: any) => { | ||
// autoComplete='off' is hard-coded inside SelectField, but doesn't work in Chrome. | ||
// Having an invalid value hard-coded disabled it in all browsers. | ||
return <components.Input {...props} autoComplete="one-time-code" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not chrome-off
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@aigoncharov I couldn't decide whether it's better to use an invalid a11y value or a value that shouldn't in practice effect functionality. I was 50/50, now I'm thinking an explicit chrome-off could be better, even though it's invalid.
If it's ok with you I'll merge and fix #145 afterward, I'm quite limited on time right now. |
I admit this is not very elegant, but it works. Instead of using currently hard-coded value off, we hard-code it to chrome-off which really disables it in all browsers.
Any other suggestions are welcome.
Do you have any other use-cases where we would actually need to provide a value for this component?
Problem with a current implementation:
Related issue: JedWatson/react-select#3500