I have 2 selects, both with mode="multiple"
and both being passed an array of strings as value={query.x}
. But one is throwing a typescript error and the other isn't. And if I comment out the one not working, the page renders and everything is fine, so something fishy is going on.
Why is it giving me that Type 'string[]' is not assignable to type 'string'
error, only in one case?
It was because my onChange
handler still had value: string
on it, instead of value: Array<string>
!