DataTables / Responsive

Responsive extension for DataTables, providing support for complex tables on all device screen sizes
Other
148 stars 86 forks source link

Extra wide right most control column #66

Closed MacTwister closed 8 years ago

MacTwister commented 8 years ago

When using the Responsive plugin and just scrolling with no pagination. I get header miss alignment which I believe you have recently fixed in a unreleased commit. If I add this fix to the plugin, I now see that the last column which I use for the plus/minus icon has a really wide width. How is it possible I can make it have a min width and/or show more columns or is it some kind of bug?

Also If I turn paging ON, I get way more columns shown in the same view then if its off.

I and using bootstrap styling and here is screen shot of what that column looks like: responsive-control-column

Here is a sort of similar example, when loading with smaller window, I get a really wide control column and even long when expanding hidden fields. http://jsfiddle.net/17avpsep/1/

It would be nicer to get this working with the Scroller plugin, but this makes the last column to far right and I have to mouse scrollI to see it. So seems again slight issue with column width?

DataTables commented 8 years ago

I'm reasonably sure that this is related (or possibly a duplicate) of #56 - possibly #64 as well.

Resizing the JSFiddle output window, for example, will align the table correctly. I'll try to look into this later this week, although it might well be next week before i get a chance to do so.

DataTables commented 8 years ago

Fiddle showing the fix: http://jsfiddle.net/17avpsep/3/

KeithETruesdell commented 6 years ago

I found that just using the property

var storesListDT = $("#storesTable").dataTable({
....... settings .....
, "scrollX": "100%" 
...... more settings ....
,"columnDefs": [
    { "visible": false, "targets": [0,3,8,9,10,11] }
]
....and more settings....
});

in the initial configuration and making sure the table has a "width=100%" worked for me. My table was pretty complex and had a ton of configuration initially and this was the core of what worked. Also, I made sure that "responsive: false" was used or the responsive option was not used at all. This actually caused some other issues with rendering.

DataTables commented 6 years ago

The commit above was actually for Scroller bug #66.