'Type 'string[]' is not assignable to type 'string' in Antd Select value?
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?
Solution 1:[1]
It was because my onChange handler still had value: string on it, instead of value: Array<string>!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Alien |


