react-dropdown icon indicating copy to clipboard operation
react-dropdown copied to clipboard

PropType errors

Open sanbornhilland opened this issue 6 years ago • 0 comments

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'}

sanbornhilland avatar Jan 28 '19 15:01 sanbornhilland