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

[Vue warn]: <TransitionGroup> children must be keyed. With whitespace = 'preserve' #11885

Closed
LeftGamer1 opened this issue Sep 10, 2024 · 0 comments · Fixed by #11888
Closed
Labels
🐞 bug Something isn't working scope: transition

Comments

@LeftGamer1
Copy link

LeftGamer1 commented Sep 10, 2024

Vue version

3.5.4

Link to minimal reproduction

https://codesandbox.io/p/sandbox/vue3-transition-group-with-whitespace-preserve-chg4p8?file=%2Fsrc%2FApp.js

Steps to reproduce

  1. open devtools console
  2. click 'toggle' button (optional tbh)

What is expected?

No whitespace node when markdown tags with newlines

What is actually happening?

Console spamming with [Vue warn]: <TransitionGroup> children must be keyed because of whitespace node (generated from newline)

System Info

No response

Any additional comments?

Also on sandbox i have commented working variation.
Also2 there is no issue when using Vue2, i know that since i am working on migrating my repo.

Link that i provided was for a .js template option without Vite;
I also have a link for a case with Vite and tag: https://codesandbox.io/p/devbox/jolly-ives-l6jfvx

Also there is console.log of slot, in working variation without newlines - there is only 2 nodes, and with newlines - 3 nodes (where one of them has children: ' '

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🐞 bug Something isn't working scope: transition
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants