radix-vue / radix-vue

Vue port of Radix UI Primitives. An open-source UI component library for building high-quality, accessible design systems and web apps.
https://radix-vue.com
MIT License
2.77k stars 149 forks source link

[Bug]: ToggleGroup type inference warning. #884

Closed kilobyte2007 closed 1 month ago

kilobyte2007 commented 1 month ago

Environment

Developement/Production OS: Windows 10 19043.1110
Node version: 16.0.0
Package manager: pnpm@8.6.0
Radix Vue version: 1.0.0
Vue version: 3.0.0
Nuxt version: 3.0.0
Nuxt mode: universal
Nuxt target: server
CSS framework: tailwindcss@3.3.3
Client OS: Windows 10 19043.1110
Browser: Chrome 90.0.4430.212

Link to minimal reproduction

https://stackblitz.com/edit/mupd7a

Steps to reproduce

Open the reproduction link and see the warning in the console.

Describe the bug

The type of the toggle group should not be mandatory if the modelValue is passed. This is the warning:

Invalid prop `modelValue` of type object supplied with type `single`. The `modelValue` prop must be a string or `undefined`.
You can remove the `type` prop to let the component infer the type from the modelValue prop.

Expected behavior

No response

Context & Screenshots (if applicable)

No response