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

console warning: Received false for non-boolean attribute tabIndex (React 16) #493

Closed
vulcanoidlogic opened this issue Sep 10, 2017 · 6 comments
Milestone

Comments

@vulcanoidlogic
Copy link

vulcanoidlogic commented Sep 10, 2017

Please see: https://codesandbox.io/s/ory016yr9 with developer tools open.

Using react 16.0.0-rc.2, react-day-picker 6.1.0

<DayPicker canChangeMonth={false} selectedDays={new Date()} />

Displays the following in developer console:

**Warning: Received `false` for non-boolean attribute `tabIndex`. If this is expected, cast the value to a string.
    in div (created by DayPicker)
    in div (created by DayPicker)**

I don't know how to create a Pull Request, but on my local, the warning disappears if I modify
DayPicker.js.

- tabIndex: this.props.canChangeMonth && this.props.tabIndex,
+ tabIndex: (this.props.canChangeMonth && this.props.tabIndex ? this.props.tabIndex : "-1"),

Thank you.

@gpbl gpbl added the bug label Sep 13, 2017
@gpbl gpbl added this to the v6.1.1 milestone Sep 13, 2017
@gpbl
Copy link
Owner

gpbl commented Sep 13, 2017

Thanks @vulcanoidlogic for the report!

@gpbl gpbl modified the milestones: v6.1.1, v6.2.0 Sep 27, 2017
@gpbl
Copy link
Owner

gpbl commented Oct 5, 2017

Fixed in #501

@gpbl gpbl closed this as completed Oct 5, 2017
@gpbl
Copy link
Owner

gpbl commented Oct 5, 2017

Published as 6.2.0.

@mhdSid
Copy link

mhdSid commented Oct 20, 2017

I say the people who are responsible for REACT should fix this - cast whatever they need but not force us to cast ourselves.

@davidspiess
Copy link
Contributor

@gpbl can this fix be backported to the 5.x.x branch?

@gpbl
Copy link
Owner

gpbl commented Mar 12, 2018

@davidspiess I think yes? I've never published a prev version! Try to send a PR, versions are tagged. Thanks

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

No branches or pull requests

4 participants