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

javascript - Confirm a form & display message if form is valid with JQuery -

Retrieving ETA (estimated time of arrival) with Google Distance Matrix API and public transit as transport mode -

ionic framework - Meteor - Error: Failed to execute 'insertBefore' on 'Node' -