Closed RazorSiM closed 1 month ago
This same issue exists in https://github.com/radix-vue/shadcn-vue/blob/dev/apps/www/src/lib/registry/default/ui/dropdown-menu/DropdownMenuRadioItem.vue also.
This is related to https://github.com/radix-vue/shadcn-vue/issues/574, and should be fixed with radix-vue v1.8.2
.
@RazorSiM try restart vscode extension 😁
Reproduction
https://github.com/radix-vue/shadcn-vue/blob/dev/apps/www/src/lib/registry/default/ui/switch/Switch.vue
Describe the bug
I'm currently exploring shadcn-vue and I found a problem with typings in the
Switch
component.In the original code, the props are passed and defined as following:
The way the
delegatedProps
is defined, makes theSwitchRoot
from radix-vue go crazy:Even though I checked how the
useForwardPropsEmits()
works, I couldn't find why the need of thedelegatedProps
composable.I could solve my issue by:
Am I missing anything here?
I can confirm the component is working correctly inside a form handled by vee-validate.
PS: I've set the reproduction link as the component itself. You should be able to check the type error by simply cloning and opening the Switch component.
System Info
Contributes