radix-vue / shadcn-vue

Vue port of shadcn-ui
https://www.shadcn-vue.com/
MIT License
3.51k stars 203 forks source link

fix: delegatedProps type error on Checkbox #576

Closed JoeyMckenzie closed 1 month ago

JoeyMckenzie commented 1 month ago

๐Ÿ”— Linked issue

Similar to https://github.com/radix-vue/shadcn-vue/issues/574, Checkbox was also having the same compile errors due to type mismatch on delegatedProps. Just noticed it working on a new project and pulling in the latest version of the component.

โ“ Type of change

๐Ÿ“š Description

๐Ÿ“ธ Screenshots (if appropriate)

๐Ÿ“ Checklist

sadeghbarati commented 1 month ago

Based on Zernonia's comment,useForward... functions will accept ComputedRef or Ref for delegatedProps

If you have type error, this should be resolved after 1.8.1

JoeyMckenzie commented 1 month ago

Ah good to know. Thank you!

sadeghbarati commented 1 month ago

Related PR in radix-vue https://github.com/radix-vue/radix-vue/pull/943

Can you test this and see if type error is gone or not, thanks

npm i https://pkg.pr.new/radix-vue@943
zernonia commented 1 month ago

Yeah there was a type error in v.1.8.0. As @sadeghbarati pointed out, https://github.com/radix-vue/radix-vue/pull/943 should fix this issue

JoeyMckenzie commented 1 month ago

Yep, fixed with the new version. Thank you! Closing this PR.