table icon indicating copy to clipboard operation
table copied to clipboard

The last column with no width specified is hidden in case of lack of space (fixed layout, scroll.x=true)

Open vitaliymaz opened this issue 4 years ago • 3 comments

Reproduction link: https://codesandbox.io/s/goofy-mccarthy-714t3?file=/src/App.js

Preconditions:

  • table-layout: fixed
  • scroll={ x: true }
  • all columns have specified width, the last one - not

Steps to reproduce:

  • Reduce the page size so the half of the table is under the horizontal scroll
  • Scroll horizontal scrollbar to the end

Actual result: the last column "Operations" is hidden Expected result: "Operations" column is visible.

vitaliymaz avatar Aug 03 '21 15:08 vitaliymaz

I think I'm facing the same issue, or a similar one aKCWHpVoOV

by giving all the columns fixed width, excluding one, it auto expands to take all the available space. but it also means that it doesn't have a min-width, which cases to column to disappear on smaller screen resolutions/sizes

by looking at the source code, and specifically this code snippets image image

you can override the html attributes passed to the <col> tag by adding an "RC_TABLE_INTERNAL_COL_DEFINE" field to the desired column options image image

which should resolve the issue in an "unofficial" way

MorisR avatar Oct 05 '21 07:10 MorisR

@MorisR, that is a good idea. But unfortunately, it doesn't work in Firefox. Please, check it here. https://codesandbox.io/s/autumn-shadow-22bjj?file=/src/App.js

vitaliymaz avatar Oct 05 '21 08:10 vitaliymaz

@vitaliymaz yeah.... guess it's a bug then :/

MorisR avatar Oct 05 '21 09:10 MorisR