How to change searchbuilder dropdown menu position?

How to change searchbuilder dropdown menu position?

mastercoriamastercoria Posts: 3Questions: 0Answers: 0

I am having the following error:

And I want to change the position of the search builder instead of being a popup, appear above the buttons, but behind the MenuLength. Something like you guys have here:

https://datatables.net/extensions/searchbuilder/examples/integration/buttons.html

Could you please help me?

Replies

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

    Do you mean something like this: https://live.datatables.net/damoyeqe/2/edit

    There the SearchBuilder is above the export buttons.

    Colin

  • mastercoriamastercoria Posts: 3Questions: 0Answers: 0
    edited February 2023

    Hello Mr. Colin!
    Yes, but the problem is that when I use this method, the LengthMenu hides... Is there a possibility to work it directly with buttons?

    I am dynamically inserting the buttons using this code:
    table.buttons().container().appendTo('#datatable_wrapper .col-md-6:eq(0)');

    Looking at the first image, the first button is the searchBuilder... Is there any solution to display the searchBuilder menu above those buttons? But keeping the searchBuilder button inside the buttons... I don't know if I am meaning well...

  • kthorngrenkthorngren Posts: 21,171Questions: 26Answers: 4,922

    but the problem is that when I use this method, the LengthMenu hides.

    Add the l option to the dom option to display the length menu.

    Is there any solution to display the searchBuilder menu above those buttons?

    You can add the SearchBuilder similar to the way you are adding the buttons. See this example.

    Kevin

Sign In or Register to comment.