Skip to content

fix: dont add to parent from _setupAsRootView - #10554

Merged
NathanWalker merged 2 commits into
mainfrom
farfromrefug-patch-1
Jun 28, 2024
Merged

fix: dont add to parent from _setupAsRootView#10554
NathanWalker merged 2 commits into
mainfrom
farfromrefug-patch-1

Conversation

@farfromrefug

Copy link
Copy Markdown
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
@NathanWalker
NathanWalker merged commit 88a0472 into main Jun 28, 2024
@NathanWalker
NathanWalker deleted the farfromrefug-patch-1 branch June 28, 2024 20:44
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.

2 participants