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

fix: dont add to parent from _setupAsRootView #10554

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

farfromrefug
Copy link
Collaborator

In some cases you might want to set a parent(mostly rootView) before _setupAsRootView so that the the view calling _setupAsRootView inherits CSS variables and classes from the parent.
This is especially done in plugins like bottomsheet or dialogs or popover.
The issue is that if you set parent before _setupAsRootView then _addViewToNativeVisualTree will be called which could break things like it does with RadSideDrawer nativescript-community/ui-material-components#462.

This PR fixes that by just preventing _addViewToNativeVisualTree to be called from _setupAsRootView which makes sense to me.

PR Checklist

What is the current behavior?

What is the new behavior?

Fixes/Implements/Closes #[Issue Number].

@cla-bot cla-bot bot added the cla: yes label May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant