Closed twisty closed 6 years ago
We need to allow an array type for the value prop. For example, to set the values of multiple select component:
const MultiSelect = (props) => { return ( <select multiple value={props.value}> <option value="a">A</option> <option value="b">B</option> <option value="c">C</option> </select> ); } ReactDOM.render(<MultiSelect value={['a','c']} />, mountNode);
We need to allow an array type for the value prop. For example, to set the values of multiple select component: