Skip to content

Commit

Permalink
fix: Measure offsetHeight vertical overflow (#3061)
Browse files Browse the repository at this point in the history
Make sure to measure `offsetHeight`. This was missed during this [PR](https://github.com/Workday/canvas-kit/pull/3035/files#) that added the vertical overflow behavior.

[category:Components]

Co-authored-by: manuel.carrera <[email protected]>
  • Loading branch information
mannycarrera4 and manuel.carrera authored Dec 2, 2024
1 parent 46580ea commit 9ecb2d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/react/collection/lib/useOverflowListTarget.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const useOverflowListTarget = createElemPropsHook(useOverflowListModel)((
parseFloat(styles.marginLeft) +
parseFloat(styles.marginRight),
height:
localRef.current.offsetWidth +
localRef.current.offsetHeight +
parseFloat(styles.marginTop) +
parseFloat(styles.marginBottom),
});
Expand Down

0 comments on commit 9ecb2d9

Please sign in to comment.