-
Given a list of SelectItem with value |
Beta Was this translation helpful? Give feedback.
Answered by
diegohaz
Mar 29, 2024
Replies: 1 comment 3 replies
-
If you use controlled state, you can sort the value yourself: const [value, setValue] = useState(["Apple", "Cake"]);
value.sort((a, b) => a.localeCompare(b));
<SelectProvider value={value} setValue={setValue}> |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
sidx1024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you use controlled state, you can sort the value yourself: