Prevent SearchBuilder from pushing down table

Prevent SearchBuilder from pushing down table

tom99tom99 Posts: 48Questions: 10Answers: 0

It is clear, that the SearchBuilder needs space when building conditions (if it is not integrated into the Buttons extension).

So, when adding conditions, it just pushes the table down. But if the size of the window is fixed (no scrolling), then the table below gets cut at the bottom.

Is it somehow possible to reduce the height of the table automatically when the SearchBuilder needs more space, so that the total space stays the same?

Thanks!

This question has accepted answers - jump to:

Answers

  • tom99tom99 Posts: 48Questions: 10Answers: 0

    I tried with the scrollResize plugin but that does not help either because the SearchBuilder is part of the table itself.

  • sandysandy Posts: 913Questions: 0Answers: 236
    Answer ✓

    Hi @tom99 ,

    You could count the number of div.dtsb-criteria on each draw using jQuery and then reinitialise the DataTable using the pageLength option.

    Thanks,
    Sandy

  • kthorngrenkthorngren Posts: 21,685Questions: 26Answers: 5,019
    Answer ✓

    Maybe you can use a div that resizes over the top of the Datatable. I need to learn more CSS so I built this as an example:
    http://live.datatables.net/jepupewe/1/edit

    This example explains how to use the API to initialize so you can place the Search Builder where you like.

    Kevin

  • tom99tom99 Posts: 48Questions: 10Answers: 0

    Thank you both. Very good ideas.

This discussion has been closed.