Skip to content

Commit e46e5a6

Browse files
committed
chore: extend with additional note
1 parent a060b03 commit e46e5a6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

package/src/components/UIComponents/PortalWhileClosingView.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,13 @@ type PortalWhileClosingViewProps = {
4848
*
4949
* Host registration is done once per key; subsequent layout updates are pushed via shared values.
5050
*
51+
* Note: As the `PortalWhileClosingView` relies heavily on being able to calculate the layout and positioning
52+
* properties of its children automatically, make sure that you do not wrap absolutely positioned views with
53+
* it as positioning parameters specifically will not be calculated correctly as the absolute position of
54+
* the immediate child will be towards its immediate parent (which is our `Portal` view). Instead, wrap its
55+
* children directly (the non-absolutely positioned ones). Since we use `measureInWindow` to get a hold of
56+
* the initial measurements, we'll always have the correct position of the relevant content.
57+
*
5158
* @param props.children content to render and teleport while closing
5259
* @param props.portalHostName closing host slot name used for layout registration and portal target
5360
* @param props.portalName stable portal instance name for `react-native-teleport`

0 commit comments

Comments
 (0)