Skip to content

Commit 0ef52b7

Browse files
ladiproberickson1
authored andcommitted
Use zero-sized PopupContainerView for RN hidden popups (microsoft#607)
Passing 0 for size to renderPopup() is not enough to make the popup reliably render as hidden. The bug reproduces as "ghost" components showing on the screen when a regular popup is shown and a cacheable popup is rendered as hidden.
1 parent 0bf0bd0 commit 0ef52b7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/native-common/PopupContainerView.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,9 @@ export class PopupContainerView extends PopupContainerViewBase<PopupContainerVie
129129
alignItems: 'flex-start',
130130
alignSelf: 'flex-start',
131131
opacity: this.state.isMeasuringPopup ? 0 : 1,
132-
overflow: 'visible'
132+
overflow: 'visible',
133+
width: this.props.hidden ? 0 : undefined,
134+
height: this.props.hidden ? 0 : undefined
133135
};
134136

135137
return (

0 commit comments

Comments
 (0)