reactjs - Make react-select compatible with redux form -


i have react-select component , made compatible redux-form following way:

const myselect = props => (   <select     {...props}     value={props.input.value}     onchange={value => props.input.onchange(value)}     onblur={() => props.input.onblur(props.input.value)}     options={props.options}     placeholder={props.placeholder}     defaultvalue={props.defaultvalue}   /> ); 

i'm having 2 issues though. 1 issue when click in box must click 1 more time dropdown menu collapse. second issue defaultvalue prop not working. i'm calling myselect component this:

<div classname="select-box__container">                 <field                   id="status"                   name="status"                   component={selectinput}                   options={statusoptions}                   defaultvalue="any"                   clearable={false}                   placeholder="select status"                 />               </div> 

any ideas?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -