-
-
Notifications
You must be signed in to change notification settings - Fork 87
Description
When using the preview prop on BaseContextMenu, the preview element is rendered directly in the UI and is always visible. Based on the docs and iOS behavior, it should only appear when the context menu is opened (on long press).
Example Code (from repo examples/ folder):
<BaseContextMenu
title={"Custom Preview"}
actions={[
{
title: "Test Item",
},
]}
previewBackgroundColor="transparent"
preview={
<View style={[styles.rectangle, { backgroundColor: "green" }]} nativeID="WORKAROUND" />
}
onPreviewPress={() => Alert.alert("Preview Tapped")}
>
<View nativeID="WORKAROUND" style={[styles.rectangle, { backgroundColor: "red" }]} />
</BaseContextMenu>
Expected Behavior
Only the red rectangle should be visible in the normal UI.
The green rectangle (preview) should only appear inside the context menu when long pressing the red rectangle.
Actual Behavior
The green rectangles is rendered directly on screen.
Environment
[email protected]
[email protected]
expo@54
Platform: iOS (tested on simulator and device on ios 26)
Screenshots
Additional Notes
Might be related to how preview is mounted internally. In my case, the preview component renders directly instead of only being used by the context menu interaction.