SearchPanes and table.length

SearchPanes and table.length

leprimoleprimo Posts: 25Questions: 4Answers: 0
edited November 2020 in DataTables 1.10

Despite an intensive search I cannot find a solution, maybe someone can give me a hint.
After filtering through the SearchPane I want to see all filtered results in the table.
My length menu is like:
lengthMenu: [[10, 25, 50, -1], [10, 25, 50, "Alle"]]

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    I'm not clear what you mean. Are you expecting all the search results to be displayed, regardless of the current page length?

    Colin

  • leprimoleprimo Posts: 25Questions: 4Answers: 0

    Hi Colin,

    exactly, that's what I mean. I want the table to automatically take the length of the search results. Better?

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    There's nothing built-in, but you could listen to search and re-size the table based on the filtered rows. The only down-side is that the event would be triggered for all searches, not just those from SearchPanes,

    Colin

  • colincolin Posts: 15,240Questions: 1Answers: 2,599
    Answer ✓

    Here's a crude example - it'll need some tidying up,

    Colin

  • leprimoleprimo Posts: 25Questions: 4Answers: 0

    Many thanks, i think that does what i want.

This discussion has been closed.