filamentgroup / tablesaw

A group of plugins for responsive tables.
MIT License
5.48k stars 434 forks source link

Table Width issue #250

Closed mckrti closed 7 years ago

mckrti commented 8 years ago

I have implemented tablesaw before, and am trying to implement it on a new project. It seems to be miscalculating the width somehow.

The table originally has these attributes:

style="table-layout: fixed; width: 100%;"

However, after including the js, css and the classes, it is being rewritten to:

style="table-layout: fixed; width: 74px;"

This is happening on my desktop, ie a 1200+px width resolution. I'm guessing something is in the code to cause this potentially? The table is also built dynamically, so I wonder if that is also an issue?

otskarli commented 7 years ago

I had the same problem with swipe mode first column, since i have no time to wait answers, i just overwrite it like this. in your case: width: 100%!important;

mlingureanu commented 7 years ago

in tablesaw.js replace line 2933 with : width = $(this).width();

zachleat commented 7 years ago

Is the table hidden during initialization? It needs to be visible to size it correctly. If you’d like additional help with this, please reopen and attach a test case.