gregnb / mui-datatables

Datatables for React using Material-UI
MIT License
2.71k stars 932 forks source link

Resizeable columns doesn't work well if columns are crowded #1427

Open jbockerstette opened 4 years ago

jbockerstette commented 4 years ago

resizableColumns: true This setting works fine if there is space available between columns. However, if the table is packed with columns, you cannot resize a column.

Expected Behavior

I would expect that the default behavior would be to allow resize of columns like an Excel spreadsheet column resize works. When the column is expanded in Excel, the page width get wider to accommodate the wider column while keeping the other column widths the same.

Current Behavior

Your column resize is constrained by how much the neighboring columns can shrink down. The page width is not allowed to change.

Steps to Reproduce (for bugs)

Using your #resizable-columns demo.

  1. Move each column resize bar as far as they will go to the right.
  2. Notice that in this state, only the far left counter column resize bar can be used to resize the columns.
  3. This happens because the page width does not expand as needed.
  4. Notice that Excel columns always allow you to resize.
  5. The problem for me is that our Data Table has a lot of columns and there is very little room to resize. However, our user's are fine with scrolling the page to the left and right if the page grows bigger than the screen width.

Your Environment

Tech Version
Material-UI 4.10.0
MUI-datatables 3.2
React 16.10.2
browser chrome 84.0
patorjk commented 4 years ago

I was actually thinking about this the other day. If I get some time I'll try and look into this.

Kert905 commented 3 years ago

Hi, Have anyone solved this issue? I am also facing this problem