Open xgokhankose opened 7 months ago
const [selected, setSelected] = useState();
const [countries, setCountries] = useState([]);
<SelectList
setSelected={(val) => setSelected(val)}
data={countries}
save="value"
width="80%"
position="absolute"
style={{width: 200, position:"absolute"}}
/>
Your selected object in this case is property selected.
const [selected, setSelected] = useState(); const [countries, setCountries] = useState([]); <SelectList setSelected={(val) => setSelected(val)} data={countries} save="value" width="80%" position="absolute" style={{width: 200, position:"absolute"}} />
Your selected object in this case is property selected.
setSelected={(val) => setSelected(val)}
returning this: save="value"
, i wanna get object not a value
Is there any way to get selected object ?