Searchbar boostrap 5 class

Searchbar boostrap 5 class

ECEGROUPEECEGROUPE Posts: 78Questions: 29Answers: 1
edited July 2023 in Free community support

By defaut the searchbar have the following class form-control form-control-sm. Is there a intregrated method in datatables to only keep form-control and do not have form-control-sm class ? Or a method to define the default class ?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,510Questions: 1Answers: 10,471 Site admin
    edited July 2023 Answer ✓

    What to do is set the class that DataTable will use:

    DataTable.ext.classes.sFilterInput =  "form-control";
    

    edit Do that after you loading the DataTables JS, but before you initialise the DataTable.

    Allan

  • ECEGROUPEECEGROUPE Posts: 78Questions: 29Answers: 1

    It work, thank !

    For anyone reading this post, this also work $('#example_filter').find('.form-control-sm').removeClass('form-control-sm'); but the solution from Allan is better because it's built in Datatable.

Sign In or Register to comment.