Skip to content
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

tabIndex should be a number or string/number #3687

Closed
ematipico opened this issue Jul 22, 2019 · 2 comments · Fixed by #4443
Closed

tabIndex should be a number or string/number #3687

ematipico opened this issue Jul 22, 2019 · 2 comments · Fixed by #4443
Labels
issue/reviewed Issue has recently been reviewed (mid-2020)

Comments

@ematipico
Copy link

ematipico commented Jul 22, 2019

tabIndex is now a string inside the propTypes but it should be also a number (built in types in JSX mark tabIndex as number)

I noticed that there was a PR fix this: https://github.com/JedWatson/react-select/pull/1595/files

But somehow the code is now reverted: https://github.com/JedWatson/react-select/blob/master/packages/react-select/src/Select.js#L241

This is causing problems with the types (using TypeScript) where they have marked tabIndex as a string, forcing me to do some funky conversion inside my code base. Is there a reason for this choice of is it just an error?

@bladey bladey added the issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet label May 29, 2020
@bladey bladey added issue/reviewed Issue has recently been reviewed (mid-2020) cat/question and removed issue/bug-unconfirmed Issues that describe a bug that hasn't been confirmed by a maintainer yet labels Jun 18, 2020
@bladey
Copy link
Contributor

bladey commented Jun 23, 2020

As far as I can see this was re-implemented from scratch at one point and the string/number improvement was not brought forward.

@ebonow
Copy link
Collaborator

ebonow commented Feb 10, 2021

Greetings @ematipico and sorry for the late reply to this...

I see no reason why this shouldn't also be type number especially since the one defined value for it in Select.js is a number

I have created PR to resolve this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/reviewed Issue has recently been reviewed (mid-2020)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants