Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35373

Suggestion: Responsive breakpoints, container vs viewport

$
0
0

I found it more useful to have responsive breakpoints that are set with reference to the table's container instead of the window viewport. It would be good to have this an option for the responsive extension.

Switching the frame of reference can be achieved by changing var width = $(window).width(); to var width=$(dt.table().container()).width(); within responsive's _resize: function ().

Because the container width can be changed independent of the viewport size users may need to initiate responsive.recalc() at times other than when the viewport is re-sized. this could be done with a listener or manually, etc.


Viewing all articles
Browse latest Browse all 35373

Trending Articles