We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 46310cf commit 7db23bcCopy full SHA for 7db23bc
src/Date/AutoSizer.tsx
@@ -26,12 +26,14 @@ export default function AutoSizer({
26
[layout, setLayout]
27
)
28
29
+ const isLayoutInizialized = layout && layout.height > 0 && layout.width > 0
30
+
31
return (
32
<View
33
onLayout={onLayout}
- style={[sharedStyles.overflowHidden, sharedStyles.root, layout && layout]}
34
+ style={[sharedStyles.overflowHidden, sharedStyles.root, isLayoutInizialized && layout]}
35
>
- {layout ? children(layout) : null}
36
+ {isLayoutInizialized ? children(layout) : null}
37
</View>
38
39
}
0 commit comments