We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 58e3ed9 commit 85706f8Copy full SHA for 85706f8
packages/core/src/controlledEnvironment/layoutUtils.ts
@@ -7,7 +7,10 @@ export const computeItemHeight = (treeId: string) => {
7
if (firstItem) {
8
const style = getComputedStyle(firstItem);
9
// top margin flows into the bottom margin of the previous item, so ignore it
10
- return firstItem.offsetHeight + parseFloat(style.marginBottom);
+ return (
11
+ firstItem.offsetHeight +
12
+ Math.max(parseFloat(style.marginTop), parseFloat(style.marginBottom))
13
+ );
14
}
15
return 5;
16
};
0 commit comments