polaris icon indicating copy to clipboard operation
polaris copied to clipboard

[IndexTable] Scrollbar doesn't appear until window is resized

Open thelaughing-man opened this issue 1 year ago • 4 comments

Summary

This issue (#7307) still occurs when an IndexTable is included in a ui-modal.

Expected behavior

The horizontal scrollbar should render allowing scrolling on larger IndexTables

Actual behavior

The scrollbar does not appear until the page is reasized just as in ticket (#7307).

The IndexTable loads with a hidden scrollbar with calss Polaris-IndexTable-scrollBarContainerHidden

Screenshot 2024-03-25 115828

After resizing the page, it vanishes

Screenshot 2024-03-25 115854

Steps to reproduce

Link to sandbox

  1. Sandbox does not support modals

Are you using React components?

Yes

Polaris version number

5.10.2

Browser

Chrome 122.0.6261.113

Device

Dell Laptop

thelaughing-man avatar Mar 25 '24 18:03 thelaughing-man

I take it back. It's happening on IndexTables not in a modal as well. I'll try to recreate in the Polaris tester.

thelaughing-man avatar Mar 27 '24 15:03 thelaughing-man

I'm getting this too. I have an IndexTable in a Page (not in a Modal). When the rows are wide enough to require the horizontal scrollbar, the scrollbar doesn't appear initially.

Resizing the browser, or changing the IndexTable's IndexFilter tab causes the scrollbar to appear.

"@shopify/polaris": "^13.4.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",`

sixkin-stephens avatar May 27 '24 20:05 sixkin-stephens

Hi, how is it going? I am having this issue two.

zgqallan avatar Aug 12 '24 18:08 zgqallan

Also having this issue. Happens to me whenever I've already created the table and add data to it so it becomes wider.

Super inefficient workaround for the above case: whenever I change the data, I change the key attribute of the IndexTable as well - this forces the table to re-render and the scroll is properly sized.

Would appreciate a fix on this though, this gets annoying with big tables.

zetdotdev avatar Oct 10 '24 10:10 zetdotdev

Super inefficient workaround for the above case: whenever I change the data, I change the key attribute of the IndexTable as well - this forces the table to re-render and the scroll is properly sized.

Worked thanks.

BenjaminPiette avatar Jan 21 '25 04:01 BenjaminPiette

Hi! We noticed there hasn’t been activity on this issue in a while. After 30 days, it will close automatically.

If it’s still relevant, or you have updates, comment and let us know. And don’t worry, you can always re-open later if needed.

github-actions[bot] avatar Jul 21 '25 03:07 github-actions[bot]