FixedColumns sorting bug on jQuery UI themed table
FixedColumns sorting bug on jQuery UI themed table
natebeaty
Posts: 15Questions: 0Answers: 0
I am attempting to implement FixedColumns and it seems to fail with the latest DataTables build. When clicking any sort header it doesn't properly update the header styling, the fixed column's elements don't reorder, and I see a js error in console:
[code]Uncaught TypeError: Cannot read property 'className' of undefined FixedColumns.js:796[/code]
I was going to send a link but noticed you have the exact same behavior on your example page: http://datatables.net/release-datatables/extras/FixedColumns/themed.html
Any help would be much appreciated.
Thanks!
[code]Uncaught TypeError: Cannot read property 'className' of undefined FixedColumns.js:796[/code]
I was going to send a link but noticed you have the exact same behavior on your example page: http://datatables.net/release-datatables/extras/FixedColumns/themed.html
Any help would be much appreciated.
Thanks!
This discussion has been closed.
Replies
I can get rid of the className error by commenting out a few lines, but obviously it still doesn't copy the jQuery UI styles across.
It also doesn't update the order on the fixed column items, so I figure there's more to it than just the class issue. I'll poke around more and see if I can pinpoint the other areas of failure.
Allan
Thanks for the quick response!
The nightly build does indeed fix the above issues, but I still see one small bug remaining:
[code]aria-sort="ascending"[/code]
remains in the even as you click on other headers, which we're using to style the currently sorted header (since class="sorting_asc|desc" isn't available with "bJQueryUI": true).
I believe the aria-sort attribute should be removed when you click on other headers, and should toggle from aria-sort="ascending|descending" if you click the FixedColumn header.
[code]
aoFixedHeader[i][j].cell.setAttribute('aria-sort',aoCloneLayout[i][j].cell.getAttribute('aria-sort'));
[/code]
to line 910. That seemed to do the trick for me, and doesn't raise errors when bJQueryUI is false.
Allan