Skip to content

Scoped data attributes aren't passed down to functional components #13827

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

Closed
Hebilicious opened this issue Apr 25, 2022 · 4 comments
Closed

Scoped data attributes aren't passed down to functional components #13827

Hebilicious opened this issue Apr 25, 2022 · 4 comments

Comments

@Hebilicious
Copy link
Member

Environment

Stackblitz :

  • Operating System: Linux
  • Node Version: v16.14.2
  • Nuxt Version: 3.0.0-rc.1
  • Package Manager: [email protected]
  • Builder: vite
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

My laptop :


Reproduction

https://stackblitz.com/edit/github-5yttbb?file=pages%2Findex.vue

Describe the bug

The data-attribute of a scoped css parent isn't passed down to functional component styles (ie components created with the h function).
A picture is worth a thousands words :
image

Additional context

I don't have this issue with my usual vue3 + vite setup, so I assume it's a Nuxt bug ?

Logs

No response

@Hebilicious
Copy link
Member Author

Note that this can be worked around with :deep, just not sure why there's an inconsistency between functional and normal components🤔

@danielroe
Copy link
Member

This is Vue behaviour: https://stackblitz.com/edit/github-qwk9ei. Would you raise an upstream bug report at https://github.com/vuejs/core?

@Hebilicious
Copy link
Member Author

This is Vue behaviour: https://stackblitz.com/edit/github-qwk9ei. Would you raise an upstream bug report at https://github.com/vuejs/core?

Ah interesting it seems to be happening on SSR only then.
I don't have this issue with my vitesse setup as it's not using SSR in development mode 🤔
I'll close this, Thanks 🍡

@Hebilicious
Copy link
Member Author

@danielroe should be fixed in vuejs/core@847d7f7

@danielroe danielroe added the 3.x label Jan 19, 2023
@danielroe danielroe transferred this issue from nuxt/framework Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants