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

Can not get the child node ref in the useEffect when the tab is visible at the first time #38205

Open
JackClown opened this issue Oct 25, 2022 · 7 comments
Labels

Comments

@JackClown
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

click Tab 2

What is expected?

console shows tab 2 ref <div>Content of Tab Pane 2</div>

What is actually happening?

tab 2 ref null

Environment Info
antd 4.23.6
React 17.0.2
System macOS Monterey
Browser Chrome 106

it works fine at antd@4.21.6.
maybe it is caused by the rc-tabs using rc-motion which delays child node mounting after active changed

@JackClown JackClown changed the title Can not get the child node ref in the tab pane after tabs changed Can not get the child node ref in the useEffect when the tab is visible at the first time Oct 26, 2022
@JackClown
Copy link
Author

Any update on this matter?

@JackClown
Copy link
Author

@afc163

@JackClown
Copy link
Author

JackClown commented Dec 14, 2022

Modal has similar problem that it will delay children nodes rendering with antd@4.24.x

@JackClown
Copy link
Author

the rendering order is different as we think in the normal

@JackClown
Copy link
Author

@zombieJ

@monolithed
Copy link

I have a similar issue with flickering and render lag

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

No branches or pull requests

2 participants