maca88 / datatables.plugins

MIT License
21 stars 5 forks source link

Col Resize : Issue When having ScrollY, using Col Resize and then resizing window width #15

Closed Dihme69 closed 10 years ago

Dihme69 commented 10 years ago

HI,

First, thanks for you great works. It helped me because colreorderwithresize isn't supported anymore.

I have an issue with col resize or with my code.

When i resize a col and then resize the window, the headers of the table don't resize.

Here is an example : http://live.datatables.net/yalaxul/2

Can you help please :( ?

maca88 commented 10 years ago

Hello,

at the moment with the fixedLayout set to true (default) the columns wont be resized when the window change its size, I need to find a way to fix that. In the meantime you can set the fixedLayout to false.

Example: http://live.datatables.net/bezafuz/3

Dihme69 commented 10 years ago

Hi, thanks for your quick help.

It doesn't work with more columns:

http://live.datatables.net/bezafuz/6

maca88 commented 10 years ago

Until now, ColResize used the original DataTables function for calculating column widths on widnow resize, so your example works as it would without ColResize plugin. Here is your example without ColResize: http://live.datatables.net/bezafuz/10

The problem is that the table has by default table-layout set to auto so the table won't be shrinked if the cell content wont't fit (More HERE).

With the lastest commit I've added a custom function that calculates the widths on window resize. For now its only applied when fixedLayout is true.

Example: http://live.datatables.net/bezafuz/8

Dihme69 commented 10 years ago

Hi, thank you, i found my error. The think is i hadn't a proper dom. Like i hadn't the

and the css that comes with it.