Starting multi with already selected icons #314
-
Beta Was this translation helpful? Give feedback.
Answered by
csandman
Apr 15, 2024
Replies: 1 comment 1 reply
-
Sure, just pass the options you'd like to be selected by default in the const MySelect = () => {
const [selectedPeople, setSelectedPeople] = useState([
{ label: "Jorge", value: "Jorge" },
{ label: "Matheuw", value: "Matheuw" },
]);
return (
<Select isMulti value={selectedPeople} onChange={setSelectedPeople} />
);
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
gustavool1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sure, just pass the options you'd like to be selected by default in the
value
prop: