FixedHeader is broken for tables with colspans (1.10.10+)?
FixedHeader is broken for tables with colspans (1.10.10+)?
I'm using 1.10.9 and have a table with fixed header enabled. My table has a few rowspans and it works just fine. Here is a live example http://live.datatables.net/quzasiye/1/watch?html,js,output
Recently I've updated to the latest datatables version and looks like fixed header functionality does not work anymore. Here is an example with version 1.10.10 (any later versions have the same issue) - http://live.datatables.net/quzasiye/2/watch?html,js,output
What this functionality removed? Was it broken unintentionally? Or should I do some additional configurations to make it working again?
Answers
I think I found an issue in datatable code. See function "_fnCreateTr":
1.10.9:
1.10.12
Code introduced in 1.10.10 breaks the logic with colspans.
In case of colspan nTd is undefined and you get an error while trying to access nTd._DT_CellIndex.
Can it be fixed in next version?
allan, what can you say about it?
colspan
androwspan
have never worked properly in thetbody
in DataTables. They are not supported there and probably never will be due to the complexity they introduce.Sorry I don't have better news. If it worked at all before then it was entirely by fluke (although I'm very surprised that it worked at all).
Allan
Ah... I see.
Actually I tried to add a check that nTr is not undefined before setting _DT_CellIndex and fixedHeader started working again. Ordering and searching feature is disabled for my table. If any chance to add that condition, it would be great because at least fixedHeader will be unofficially supported.
Anyway, thanks for your reply, Allan.