skratchdot / react-bootstrap-multiselect

A multiselect component for react (with bootstrap). This is a react port of bootstrap-multiselect.
http://projects.skratchdot.com/react-bootstrap-multiselect/
Other
119 stars 62 forks source link

Extraneous props passed to select element, resulting in React warning #49

Closed justin-perinovic closed 7 years ago

justin-perinovic commented 7 years ago

This appears to be the offending code, in lib/index.js:

render: function () { //this.setOptionsFromProps(); return React.createElement('select', objectAssign({}, this.props, {ref: 'multiselect'})); }

wvengen commented 7 years ago

This is an example warning I'm seeing:

Warning: Unknown props `nonSelectedText`, `buttonClass` on <select> tag. Remove these props from the element. For details, see https://fb.me/react-unknown-prop
    in select (created by MultiSelect)
    in MultiSelect (created by FooView)
skratchdot commented 7 years ago

I just published a new version 2.3.0 that should fix this. Please re-open if you still see the error. In my local testing, 'data' did not throw the error, but I'm not sure if that's true for all versions of react 15

wvengen commented 7 years ago

I can confirm that this is solved (using React 15.3.2), thanks!