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

Volar confuses ref for a component when using kebab-case syntax #2010

Closed
victorgarciaesgi opened this issue Oct 13, 2022 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@victorgarciaesgi
Copy link

First thing thanks a lot for making Volar and congrats on 1.0.0!

Basically, if I have a component and a ref that have the same name but with different casing (basically: foo and Foo), Volar will confuse the ref for a component when using kebab-case style. (<foo/>)
The error is not here when using PascalCase.

Exemple component: https://codesandbox.io/s/elated-hooks-d9vgsb?file=/src/App.vue

Screenshot is using <script setup/>

image

@johnsoncodehk johnsoncodehk added the bug Something isn't working label Oct 13, 2022
@victorgarciaesgi victorgarciaesgi changed the title Volar confuses ref for a component when using kebab-case syntaxt Volar confuses ref for a component when using kebab-case syntax Oct 14, 2022
@innocenzi
Copy link

I have a similar issue here: https://github.com/hybridly/demo/blob/main/resources/views/pages/chirps/show.vue#L21. It also works properly if I use PascalCase.

CleanShot 2022-10-14 at 16 11 23

CleanShot 2022-10-14 at 16 11 50

@victorgarciaesgi
Copy link
Author

Sorry to reopen @johnsoncodehk , I encountered the same issue, but with class-api this time

image

@victorgarciaesgi
Copy link
Author

Volar version: 1.0.8

@johnsoncodehk
Copy link
Member

We never supported class component decorations, you can a feature request.

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

No branches or pull requests

3 participants