Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: last column of table needs to resize dynamically with resizable columns #1

Closed
Etregoning opened this issue Oct 11, 2018 · 4 comments

Comments

@Etregoning
Copy link

Short Description:
When resizing the columns, it leaves a blank grey area on the right side of the table. Sorry for the small image, but the table data is irrelevant anyways :P

screenshot of issue

I feel like this is probably more of a bug than an enhancement, because I don't much want to use resizable columns if it behaves like this, but since it's not breaking the code or anything, it's more of an optimization I guess.

Environment Details

  • OS: MacOS Mojave
  • Node.js version: 10.10.0
  • npm version: 6.4.1

Code
I'm using the same code as the example on codesandbox.

Workaround
When I finish the site, I'll have a shot at trying to fix this, for now I just need to turn resizable columns off :P

@ngduc
Copy link
Owner

ngduc commented Oct 12, 2018

@Etregoning The closest grid layout I could find is "fitDataFill". It will not show the background color when you resize columns.

Could you try it again here?
https://codesandbox.io/s/oxmj02v696

@Etregoning
Copy link
Author

Well, that definitely gives a better look, thanks... but I still think if it's possible to dynamically resize the last column, that would look a lot better :D

@olifolkerd
Copy link
Collaborator

olifolkerd commented Oct 15, 2018

Hey @Etregoning

There are quite a range of options for configuring your column layout

Have a look at the fitColumns layout mode in the Layout Documentation

You can use the widthGrow and widthShrink properties to determine the amount allocated to each column.

You can also use a combination of fixed width columns and variable width columns to achieve the look you are after, but you are correct, at the moment there is no feature to allow tables to be resizable and maintain a total width of 100%. if you feel that would be useful please raise an issue on the Tabulator Repo

I hope that helps,

Cheers

Oli :)

@ngduc
Copy link
Owner

ngduc commented Oct 16, 2018

Thanks for replying @olifolkerd I was going to point him to Tabulator or file a bug there myself.

Like @Etregoning , I tried different layouts: fitDataFill, firColumns & widthGrow and widthShrink but the last column still moves when resizing other columns. Ultimately (I think) @Etregoning wants the last column to take the remaining space.

This is an example: (using another grid) - http://jsfiddle.net/9js6z61g/
I'm closing this one & filing it in Tabulator. Thanks.

@ngduc ngduc closed this as completed Oct 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants