Combobox.items must be mutable? #648
Replies: 1 comment
|
Your own inspection is the strongest evidence here, if
Given that, relaxing the type to |
|
Your own inspection is the strongest evidence here, if
Given that, relaxing the type to |
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.)
All reactions