diff --git a/.changeset/tricky-beans-fold.md b/.changeset/tricky-beans-fold.md new file mode 100644 index 00000000000..8c4a459c90f --- /dev/null +++ b/.changeset/tricky-beans-fold.md @@ -0,0 +1,5 @@ +--- +'@shopify/polaris': patch +--- + +[IndexTable] Initially hide the scrollbar and update scrollbar padding diff --git a/polaris-react/src/components/IndexTable/IndexTable.tsx b/polaris-react/src/components/IndexTable/IndexTable.tsx index 0010a282b60..c315bd2dac8 100644 --- a/polaris-react/src/components/IndexTable/IndexTable.tsx +++ b/polaris-react/src/components/IndexTable/IndexTable.tsx @@ -134,7 +134,7 @@ export interface TableHeadingRect { offsetLeft: number; } -const SCROLL_BAR_PADDING = 4; +const SCROLL_BAR_PADDING = 16; const SCROLL_BAR_DEBOUNCE_PERIOD = 300; function IndexTableBase({ @@ -188,8 +188,7 @@ function IndexTableBase({ const [tableInitialized, setTableInitialized] = useState(false); const [stickyWrapper, setStickyWrapper] = useState(null); - const [hideScrollContainer, setHideScrollContainer] = - useState(false); + const [hideScrollContainer, setHideScrollContainer] = useState(true); const tableHeadings = useRef([]); const stickyTableHeadings = useRef([]);