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 5f79664 commit 364ffc8Copy full SHA for 364ffc8
packages/react/src/components/ListBox/ListBoxMenuItem.tsx
@@ -16,8 +16,7 @@ function useIsTruncated(ref) {
16
17
useEffect(() => {
18
const element = ref.current;
19
- const { offsetWidth, scrollWidth } =
20
- element.lastElementChild?.lastElementChild || element;
+ const { offsetWidth, scrollWidth } = element;
21
setIsTruncated(offsetWidth < scrollWidth);
22
}, [ref, setIsTruncated]);
23
0 commit comments