Key Table with Fixed Columns: bug?

Key Table with Fixed Columns: bug?

ToffeetaToffeeta Posts: 12Questions: 3Answers: 0

Hello dear Support Team,

thank you for Data Tables!! It's a great work of you!!!

But I have some Problem.
If I use Fixed Columns with the Key Table and click on one of the cells in the "frozen zone" it crashes:
"Unable to get the property "1" of undefined or null reference"

row 447 of dataTables.keyTable.js:
var iRow = _fnFindDtCell( nTarget )[1];

What I have found out is that the first (fixed) columns are not in the nTds Array: after execution of these to rows of code

var nTr = _oDatatable.aoData[ _oDatatable.aiDisplay[i] ].nTr;
var nTds = nTr.getElementsByTagName('td');

nTds has only an Array with elements from 4 to 24 (the first 4 columns in my table are fixed).

So the node from the first 4 columns wasn't found and it crashes in the row 447 of dataTables.keyTable.js:
var iRow = _fnFindDtCell( nTarget )[1];
because it tries to get the first element of null....

It would be graete if you could fix it:)

Thank you

This question has accepted answers - jump to:

Answers

  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    Answer ✓

    Yes - bug for certain. KeyTable is not currently compatible with FixedColumns.

    KeyTable is due to be rewritten in the next month or so. I'm not yet sure if I will add support for FixedColumns integration with it.

    Allan

  • ToffeetaToffeeta Posts: 12Questions: 3Answers: 0

    Thanks Allan!

  • ToffeetaToffeeta Posts: 12Questions: 3Answers: 0

    Hello Allan,

    the last few days I have tried to combine some extentions for my project.

    They are all great but it's also pity that some of them can't be combined at the moment.
    I was interested on the combination of the fixed columns with key table and responisve (because of the possibility to show some information in the child row).

    If I understood it properly, the fixed columns extention uses cloned columns and that is the problem why the key table doesn't work with it.

    What if the fixed columns won't be cloned but the columns that shouldn't be visible due to scrolling just become invisible? For example this columns could be hidden and a special class could be added to these columns in order to distinguish them from the other hidden columns if there are some.

    And as an idea for the documentation: it would be nice if there is a compatibility table of the extentions or properties. I saw a lot of questions in the forum about it.

    Thank you!

  • allanallan Posts: 61,840Questions: 1Answers: 10,134 Site admin
    Answer ✓

    If I understood it properly, the fixed columns extention uses cloned columns and that is the problem why the key table doesn't work with it.

    Sort of, yes. KeyTable isn't aware of the floating elements that FixedColumns has to add to the table. To have them work together it would need to be aware of the changes to the DOM that FixedColumns makes.

    Supporting the FixedColumns DOM structure could then be accounted for in KeyTable's logic (which would thus be far more complicated than it currently is!).

    And as an idea for the documentation: it would be nice if there is a compatibility table of the extentions or properties.

    Planned and coming in the next month or so :-)

    Allan

  • ToffeetaToffeeta Posts: 12Questions: 3Answers: 0

    Thank you, Allan!!! Thumbs up! :)

This discussion has been closed.