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

PropType errors #22

Open
sanbornhilland opened this issue Jan 28, 2019 · 0 comments
Open

PropType errors #22

sanbornhilland opened this issue Jan 28, 2019 · 0 comments

Comments

@sanbornhilland
Copy link

I'm getting several PropType warnings about booleans being passed to a div instead of strings. Specifically I'm seeing:

Warning: Received `false` for a non-boolean attribute `active`.

If you want to write it to the DOM, pass a string instead: active="false" or active={value.toString()}.

If you used to conditionally omit it with active={condition && value}, pass active={condition ? value : undefined} instead.
    in div (created by DropdownMenu)
Warning: Received `false` for a non-boolean attribute `divider`.

If you want to write it to the DOM, pass a string instead: divider="false" or divider={value.toString()}.

If you used to conditionally omit it with divider={condition && value}, pass divider={condition ? value : undefined} instead.
    in div (created by DropdownMenu)
Warning: Received `false` for a non-boolean attribute `header`.

If you want to write it to the DOM, pass a string instead: header="false" or header={value.toString()}.

If you used to conditionally omit it with header={condition && value}, pass header={condition ? value : undefined} instead.
    in div (created by DropdownMenu)

This issue can be fixed by adding this instead of spreading props. I can open a PR if this seems reasonable to you.

active={this.props.active ? 'true' : 'false'}
divider={this.props.divider ? 'true' : 'false'}
header={this.props.header ? 'true' : 'false'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants