Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82218

Design Issues of FixedColumns plugin

$
0
0
For complex header like two rows, using FixedColumns will result in ugly layout. There is a serious design issue for this plugin:

1. Should not use fnSetColumnVis(i, false) in _fnConstrcut() function. Because you call fnDraw function at the end of _fnConstruct() function. So, you should use fnSetColumnVis(i, false, false).

2. Calling fnSetColumnVis(i, false) will result in that right table will be re-drawn many times. This means that right column headers are re-layouted many times. Many styles are changed by this call. So, you didn't copied the original headers at all. That's why you have to fore the column width in exactly the same way that DataTables does it. If you call fnSetColumnVis(i, false, false), these code can be removed.

3. If you use fnSetColumnVis(i, false, false), you can remove all "width" settings for cloned elements. This means you can remove all the "width" settings in _fnClone() funciton.

Try it! You'll find it also applies to complex column headers.

Viewing all articles
Browse latest Browse all 82218

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>