Wrong cell width with fixed table #53

Closed
jbanety opened this Issue Nov 13, 2015 · 9 comments

Projects

None yet

3 participants

@jbanety
jbanety commented Nov 13, 2015

Hi,

My table is rendered with a fixed layout.
My cells are all sized with a specific width.

When I scroll down, Clusterize creates the "top-space" row which is an empty tr.
So my browser cannot set the fixed width (the width comes from the first displayed row).

Here is the example : http://jsfiddle.net/kx9fa0se/9/

@NeXTs
Owner
NeXTs commented Nov 13, 2015

Hi
Good catch! Thanks for repothing this issue. I will investigate

@NeXTs NeXTs added the bug label Nov 13, 2015
@NeXTs NeXTs self-assigned this Nov 13, 2015
@NeXTs
Owner
NeXTs commented Nov 13, 2015

as a quick workaround duplicate empty thead columns into table
http://jsfiddle.net/kx9fa0se/10/

@jbanety
jbanety commented Nov 13, 2015

I didn't think about it.
I added several td to the "top-space" tr when "clusterChanged" event triggers.
Your workaround is better.

@NeXTs
Owner
NeXTs commented Nov 13, 2015

I added several td to the "top-space" tr when "clusterChanged" event triggers.

:D
brutal

@jbanety
jbanety commented Nov 13, 2015

Yes It's a bit hacky but It does it !

@jbanety
jbanety commented Nov 15, 2015

This workaround breaks the "no data" row which needs a colspan to be as larger as the entire table.

@NeXTs
Owner
NeXTs commented Nov 15, 2015

@jbanety sad to hear that
Since you've already forked project, add temporarily extra line here

td = document.createElement('td');
td.colSpan = 100;

This will force td to be full width. I'll think about better solution

@vamp
vamp commented Dec 10, 2015

@NeXTs, better would be to add some callback, e.g. generateEmptyRow and pass created element to it:

var callbacks = options.callbacks;
callbacks.generateEmptyRow && callbacks.generateEmptyRow(empty_row);
@NeXTs
Owner
NeXTs commented Dec 17, 2015

I'm planning to rethink clusterize structure and instead of additional tags, use paddings/margins

@NeXTs NeXTs closed this in f4a9fd0 Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment