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

SWC-7131 - workaround - do not render components that are not visible #5585

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

nickgros
Copy link
Contributor

The bug occurs when we hide the visibility of a ReactComponentV2 widget containing a GWT widget inside of another ReactComponentV2 widget, but only when using the React production build. In both the React production and the development build, the ReactElement does have the expected style prop with display: "none", but the DOM node does not get the inline style in production mode.

I could not find a related bug in the React issue tracker.

As a workaround, we can simply omit rendering elements that are not visible. One risk of this approach is that any element state will be reset when the visibility is toggled.

@nickgros nickgros merged commit 7bbf6b7 into Sage-Bionetworks:develop Nov 19, 2024
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants