Multi Filter Search doesn't work properly

Multi Filter Search doesn't work properly

RoloTomasiRoloTomasi Posts: 18Questions: 9Answers: 0

Hi all,

I have set up a multi-filter search for each column. So far, so good.
Because of the width of the table, I decided not to display some columns. But if I want to show these columns, the multi-filter search only works with the next column, not with the next but one or all other columns to the right.
Obviously setting the state does not work properly. Where in the JQuery code is the state set? How can I get rid of this behaviour? https://jsfiddle.net/RoloTomasi/uqyrbv8h/33/
Thanks in advance

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,142Questions: 1Answers: 2,586

    Thanks for the example, though I'm not clear what to do with it. Please could you give some instructions on how to reproduce your issue, and say what you would expect to happen instead.

    Colin

  • RoloTomasiRoloTomasi Posts: 18Questions: 9Answers: 0

    I simplidied the example.
    https://jsfiddle.net/RoloTomasi/uqyrbv8h/55/


    • Click on "Spalten ein/ausblenden".
    • Choose "Erzielte Tore".
    • You' ll see the multi filter search "Erzielte Tore" is active.
      O.K.!

    • Deactivate "Erzielte Tore" by clicking on "Spalten ein/ausblenden"
    • Click on "Spalten ein/ausblenden".
    • Choose "Gegentore".
    • You' ll see the multi filter search "Gegentore" is not active/does not work.
      Not O.K.!
  • kthorngrenkthorngren Posts: 20,276Questions: 26Answers: 4,765
    Answer ✓

    Looks like you need to use column.index() to get the visible index of the column for this line:

    var rowTwoTH = $(table.column( column ).header()).parent().next().find('th:eq(' + column + ')');
    

    Use the following:

    var visibleIndex = table.column.index('toVisible', column);
    

    See the updated example:
    https://jsfiddle.net/a2dwjyp7/

    Kevin

This discussion has been closed.