Closed gxanshu closed 2 months ago
is there any way to pre define the value in the Select box here is the thing that i want to do let suppose
const [value, setValue] = createSignal<string[]>(['apple', 'banana']) const preValue = ['apple']
and then use that state in the select component
<Select multiple options={value()} value={preValue} // want to do something like that to already add apple and banana as selected onChange={setValue} />
Use initialValue instead of value and it should work. See kitchen sink example.
initialValue
value
is there any way to pre define the value in the Select box here is the thing that i want to do let suppose
and then use that state in the select component