selvi jp

selvi jp

  • NA
  • 323
  • 76.8k

How to set defaultValue for multi select?

Jul 20 2021 11:33 AM

I want to defaultvalue in multiple.But i can only fetch one value.How can i use Array in default value

{Details.map(Det=>
<Select 
defaultValue={{ label: Det.user_id, value: Det.user_id }}
placeholder={"Select Mates"}
onChange={this.dropdownhandleChange}
options={Dropdownlist.map(e => ({ label: e.Name, value: e.Id}))}
isMulti
 
/>
)}


Answers (5)