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

All nodes will be rendered when react key exists in the children of the TransitionGroup #863

Open
MisterLuffy opened this issue Oct 13, 2022 · 1 comment

Comments

@MisterLuffy
Copy link

MisterLuffy commented Oct 13, 2022

What is the current behavior?

All nodes will be rendered when a key exists in the children of the TransitionGroup.

Just try this Demo, after the react key is removed, conditional rendering will return to normal.

Kapture 2022-10-13 at 17 07 51

What is the expected behavior?

Conditional judgment can take effect.

@richardscarrott
Copy link

I think this might be less about having a key and more about TransitionGroup failing to unmount children which aren't Transition / CSSTransition elements?

https://codesandbox.io/s/funny-resonance-1252uf?file=/demo.js

I was using an older version of TransitionGroup to render dialogs / tooltips / popovers etc. stacked in the order they were opened. Some of these components need to animate and therefore use Transition but many don't so they simply render regular elements.

Not sure if this is a 'feature' that could be added back; from what I can tell it was removed in v2 so quite a long time ago?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants