Skip to content

Commit 475970d

Browse files
authored
fix: use scroll area for pages (#4909)
After recent changes dots button is not reachable behind native scroll. User with many pages reported the issue.
1 parent be2ae85 commit 475970d

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

  • apps/builder/app/builder/features/pages

apps/builder/app/builder/features/pages/pages.tsx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { useEffect, useRef } from "react";
22
import { useStore } from "@nanostores/react";
33
import {
44
Tooltip,
5-
Box,
65
Button,
76
SmallIconButton,
87
TreeNode,
@@ -13,6 +12,7 @@ import {
1312
TreeSortableItem,
1413
type TreeDropTarget,
1514
toast,
15+
ScrollArea,
1616
} from "@webstudio-is/design-system";
1717
import {
1818
ChevronRightIcon,
@@ -313,7 +313,15 @@ const PagesTree = ({
313313
}
314314

315315
return (
316-
<Box css={{ overflowY: "auto", flexBasis: 0, flexGrow: 1 }}>
316+
<ScrollArea
317+
direction="both"
318+
css={{
319+
width: "100%",
320+
overflow: "hidden",
321+
flexBasis: 0,
322+
flexGrow: 1,
323+
}}
324+
>
317325
<TreeRoot>
318326
{flatPagesTree.map((item, index) => {
319327
const handleExpand = (isExpanded: boolean, all: boolean) => {
@@ -435,7 +443,7 @@ const PagesTree = ({
435443
);
436444
})}
437445
</TreeRoot>
438-
</Box>
446+
</ScrollArea>
439447
);
440448
};
441449

0 commit comments

Comments
 (0)