Skip to content
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

[Bug]: useForwardProps, useForwardPropsEmits should accept reactive props #623

Closed
sadeghbarati opened this issue Jan 18, 2024 · 0 comments · Fixed by #628
Closed

[Bug]: useForwardProps, useForwardPropsEmits should accept reactive props #623

sadeghbarati opened this issue Jan 18, 2024 · 0 comments · Fixed by #628
Assignees
Labels
bug Something isn't working

Comments

@sadeghbarati
Copy link
Collaborator

sadeghbarati commented Jan 18, 2024

Environment

Radix Vue version: 1.3.2
Vue version: 3.4.13

Link to minimal reproduction

https://stackblitz.com/edit/hzbqdk?file=src%2FApp.vue

Steps to reproduce

const restOfPropsExceptClass = computed(() => {
   const { class: _, ...restOfProps } = props
   
   return restOfProps 
})


const forwardedProps(restOfPropsExceptClass.value)

Describe the bug

To prevent class duplication in cn function or $attrs object and tailwind-merge I used delegatedProps to omit class from the rest of props with computed

But using delegatedProps in forwardedProps composable is not working as excepted
It should accept these types

MaybeRefOrGetter

Expected behavior

No response

Context & Screenshots (if applicable)

No response

@sadeghbarati sadeghbarati added the bug Something isn't working label Jan 18, 2024
@zernonia zernonia self-assigned this Jan 19, 2024
@zernonia zernonia linked a pull request Jan 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants