React-select: Unknown props with React 15.2

Created on 6 Jul 2016  路  7Comments  路  Source: JedWatson/react-select

react-select now throws a warning when using React 15.2:

warning.js:44 Warning: Unknown prop `minWidth` on <input> tag. Remove this prop from the element. For details, see https://fb.me/react-unknown-prop
    in input (created by AutosizeInput)
    in div (created by AutosizeInput)
    in AutosizeInput (created by Select)
    in div (created by Select)
    in div (created by Select)
    in Select (created by Async)
    in Async (created by ComposePage)
    in div (created by ComposePage)
    in div (created by ComposePage)
    in div (created by ComposePage)
    in div (created by ComposePage)
    in ComposePage (created by RouterContext)

The React team says this needs to be fixed as it will break in the next major release: https://github.com/facebook/react/issues/7152#issuecomment-230273479

Most helpful comment

I've fixed this upstream and updated react-input-autosize, which should fix this. Will get a new npm release of react-select published as soon as I've completed testing & changelog for the fixes since the last release.

All 7 comments

Quite disappointed by React 15.2. Has to make a deep dive into both react-select and redux-form
https://github.com/erikras/redux-form/releases/tag/v6.0.0-rc.2

Simple fix by adding .input didn't help

<Select placeholder="bla-bla-bla" options={props.userTypes} searchable={true} clearable={true} {...props.input} onBlur={()=>{}} />

I've fixed this upstream and updated react-input-autosize, which should fix this. Will get a new npm release of react-select published as soon as I've completed testing & changelog for the fixes since the last release.

it's not good solving, it can work like temporary fixing. we are waiting for right solving

Any chance of getting this fix in the 0.9 branch?

Please fix 0.9 branch for users are using allowCreate feature


In the source code

var Input = require('react-input-autosize');
...
input = <Input minWidth="5" />;

Found solution: npm i --save react-input-autosize
@morsdyce

Any reason why this wasn't fixed for the 0.9 branch? Seems like a rather small thing to do... Any incompatabilities? Or just need help @JedWatson?

Suggested fix above doesn't work with yarn.

I moved to react-selectize (not to critize react-select, which is great, but this fixed my immediate problem)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

pashap picture pashap  路  3Comments

AchinthaReemal picture AchinthaReemal  路  3Comments

mjuopperi picture mjuopperi  路  3Comments

sampatbadhe picture sampatbadhe  路  3Comments

MindRave picture MindRave  路  3Comments