iTwin / iTwinUI-react

A react component library for iTwinUI.
https://github.com/iTwin/iTwinUI
Other
84 stars 23 forks source link

Table: Resize after column toggle leads to distorted columns #757

Closed HaveSpacesuit closed 2 years ago

HaveSpacesuit commented 2 years ago

Describe the bug (actual behavior)

Using a resizable table with the column manager:

Alternatively:

This does not seem to occur if the user hasn't resized a column before unhiding a column.

Expected behavior

The columns should line up with the headers when resizing after using the column manager.

Reproduction

https://codesandbox.io/s/itwinui-react-minimal-example-forked-xbs4jm?file=/src/App.tsx Column alignment

bentleyvk commented 2 years ago

I found even crazier steps to reproduce:

  1. Hide column.
  2. Resize other column.
  3. Unhide previous column.
  4. Press with mouse anywhere, e.g. right-click outside the table. table-header-shift