Skip to content

Commit 7db23bc

Browse files
authored
fix: Pixel 8a and 9 series sometimes do not render the calender #442
1 parent 46310cf commit 7db23bc

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Date/AutoSizer.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ export default function AutoSizer({
2626
[layout, setLayout]
2727
)
2828

29+
const isLayoutInizialized = layout && layout.height > 0 && layout.width > 0
30+
2931
return (
3032
<View
3133
onLayout={onLayout}
32-
style={[sharedStyles.overflowHidden, sharedStyles.root, layout && layout]}
34+
style={[sharedStyles.overflowHidden, sharedStyles.root, isLayoutInizialized && layout]}
3335
>
34-
{layout ? children(layout) : null}
36+
{isLayoutInizialized ? children(layout) : null}
3537
</View>
3638
)
3739
}

0 commit comments

Comments
 (0)