Skip to content Skip to sidebar Skip to footer

Bootstrap-table / How To Add Filter-control In Table Configuration

I'm trying to make a filter per column in Bootstrap-table. I've seen a lot of sites that use the HTML data-filter-control tag to do this, but I want to do it in the javascript side

Solution 1:

$(function () {
  $('#table').bootstrapTable({
    filterControl: true,
    disableUnusedSelectOptions: true,

    columns: [
      {
        field: "first_column",
        title: "First Column",
        filterControl: 'input',
        filterControlPlaceholder: "holder",
        filterStrictSearch: false
      },{
        field:  "second_column",
        title: "Second Column",
        filterControl: 'select',
        filterStrictSearch: false,
      },
    ]

  });
});

Post a Comment for "Bootstrap-table / How To Add Filter-control In Table Configuration"