I want to defaultvalue in multiple.But i can only fetch one value.How can i use Array in default value
{Details.map(Det=>
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
/>
)}
Vaibhav ChauhanPosted Jul 21, 2021, 5:22 AM
selvi jpPosted Jul 21, 2021, 5:40 AM
selvi jpPosted Jul 21, 2021, 5:03 AM
Vaibhav ChauhanPosted Jul 20, 2021, 1:27 PM
Check your data by printing it in console. I think you are getting multiple values in comma seperated string
so you need to split the seperated string and form the defaultValue array .
Or try to debug the code and check the length of Details array.
Vaibhav ChauhanPosted Jul 20, 2021, 12:03 PM