[go: up one dir, main page]

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

Wrong cell width with fixed table #53

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

Wrong cell width with fixed table #53

jbanety opened this issue Nov 13, 2015 · 9 comments
Assignees
Labels

Comments

@jbanety
Copy link
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
Copy link
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
Copy link
Owner
NeXTs commented Nov 13, 2015

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

@jbanety
Copy link
Author
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
Copy link
Owner
NeXTs commented Nov 13, 2015

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

:D
brutal

@jbanety
Copy link
Author
jbanety commented Nov 13, 2015

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

@jbanety
Copy link
Author
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
Copy link
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
Copy link
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
Copy link
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 as completed in f4a9fd0 Jul 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants