-
Notifications
You must be signed in to change notification settings - Fork 602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(DropdownMenu/ContextMenu): improve generic types #2490
Conversation
commit: |
I think this is linked to what I had suggested for the CommandPalette here #2260 (comment) If your items don't all have the
Should I go for the latter? |
Yes I think that would be the most convenient π |
@yassilah Trying to understand your last changes, why do we need to use this new intersection type for DropdownMenu and ContextMenu but don't need it in NavigationMenu? π€ My thought would be that the types are wrong in DropdownMenuContent and ContextMenuContent. |
So I decided to go for this "optional intersection" instead of just "intersection" for 2 reasons:
So I think this new way of inferring the types is safer and handles conflicting types properly. |
Do types work for you in this PR? I no longer have autocomplete on slots nor slot props π€ |
π Linked issue
Resolves #2140
β Type of change
Implements same type inference as #2482
π Description
π Checklist