TypeScript: Incompatible 'aria-invalid'
types for Select
#4940
Labels
issue/bug-confirmed
Issues about a bug that has been confirmed by a maintainer
issue/has-pr
Issue has a PR attached to it that may solve the issue
I'm having some issues satisfying TypeScript when upgrading from
react-select
v4 (4.3.1) to v5 (5.2.1).The crux of it is this:
I can provide a relatively complete reproduction of my types if useful but TL;DR: up the tree I'm using
AllHTMLAttributes<HTMLSelectElement>
which pulls from React's own AriaAttributes type (deep link to'aria-invalid'
here). This type differs from what's declared asProps
in Select.tsx, so when I spread props of one type onto theSelect
component,tsc
yells at me.IMO the types in
Select
should be modified to match those defined inAriaAttributes
, since presumably the attribute should follow the same spec. Let me know if I'm missing something on my end, though!The text was updated successfully, but these errors were encountered: