You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change was introduced in #24738, After that PR it's no longer possible to reuse the prop type using Partial<MenuItemProps> because of the typed event handler.
In the below repro, simply remove the onClick handler to remove the TS error
This is not a direct problem on our side, technically the changes provided by #24738 are not breaking changes as they support the same surface API. The problem here is that since we adopted ARIAButton types from that PR and forward, we've introduced an union of type on the root of the component.
Let's simply not break unions! And in this case in particular there's absolutely no reason to break MenuItemProps with Partial, as all it's properties are already optional.
Let's not use an union on root (stop using ARIAButton type)
Change was introduced in #24738, After that PR it's no longer possible to reuse the prop type using
Partial<MenuItemProps>
because of the typed event handler.In the below repro, simply remove the
onClick
handler to remove the TS errorhttps://codesandbox.io/s/still-https-kjlbz5?file=/example.tsx
The text was updated successfully, but these errors were encountered: