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

extended components fall back to global component definition. (instead of local one in "super/parent") #7680

Open
dasdeck opened this issue Feb 21, 2018 · 2 comments

Comments

@dasdeck
Copy link

dasdeck commented Feb 21, 2018

Version

2.5.13

Reproduction link

https://codepen.io/dasdeck/pen/NyMvjQ

Steps to reproduce

The codepen shows the bug on opening.

What is expected?

I'd expect "extComp" to behave exactly like "baseComp" since it is extended.

What is actually happening?

"extComp" uses the global "my-comp" definition instead of the one in the super/parent component


This might be expected/intended behavior, however, all people I asked agree that this is counter intuitive and feels more like a bug than a feature.

Cheer!

JM

@posva
Copy link
Member

posva commented Feb 21, 2018

It's not consistent, indeed, but you should name components with CamelCase: Vue.component('MyComp', CompB);, that will fix the error btw.
There is probably a normalization going on that is not working correctly

@dasdeck
Copy link
Author

dasdeck commented Feb 21, 2018

Yes, I (mostly) use PascalCasing in my actual code (not camelCasing ;)), thought the name comes from a third party library.

But this will help for now! Though a bit tricky if the naming is done in 3rd party libraries. So consistent normalization will be good!

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants