Is it possible to give search builder modal a max size.

Is it possible to give search builder modal a max size.

desperadodesperado Posts: 159Questions: 33Answers: 4

When the user has their browser very wide it makes noticing the buttons on the right very difficult.

Is it possible to set a max width for this.

There is no unique class on the search builder modal so I can't modify come css to address only the searchBuilder modal it will affect all the modals with dt-button-collection dtb-collection-closeable.

You can sort of use the Button example to see it but since the example in in a frame it's not perfect.

https://datatables.net/extensions/searchbuilder/examples/initialisation/button.html

My Datatable is very wide so I don't want to force the Data Table into a fixed frame.
Seen here.

Answers

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi @desperado ,

    Yes it is take a look at this example. I've edited the standard action for the SearchBuilder button to remove the alignment over the whole table and add a class to the overall collection using collectionLayout. Then it is just a case of setting whatever width you want.

    Thanks,
    Sandy

  • LimpEmuLimpEmu Posts: 68Questions: 18Answers: 1

    Hi @sandy and @desperado:
    It looks like this solution does not work with datatables version 2.1.8. Is there another way to do this?
    Thank you, Beate

  • LimpEmuLimpEmu Posts: 68Questions: 18Answers: 1
    edited November 20

    Hi @sandy and @desperado:
    I should have dug around in the stylesheet a bit more. Adding

        div.dt-button-collection.dtb-collection-closeable {
            width: 800px !important;
        }
    

    worked.
    Beate

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin

    Nice one - thanks for the update.

    Allan

Sign In or Register to comment.