Combobox.items must be mutable? #648
Unanswered
jamesarosen
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I tried doing this:
but
Combobox<Option, OptGroup>expectsoptions: Array<Option | OptGroup>;.So the question is: does
<Combobox>actually need to mutateoptions?The derived values like
allOptions,filteredOptionsanddisplayedOptionsuse non-destructive functions likeflatMapandfilter.Would it be reasonable to relax the type to
readonly Array<Option | OptGroup>?(I can work around it for now by casting, but if Combobox really wants to mutate the array, that's risky.)
Beta Was this translation helpful? Give feedback.
All reactions