Skip to content

Commit

Permalink
Bootstrap 5: When selectpicker, replace form-select classes with form…
Browse files Browse the repository at this point in the history
…-control and refresh it
  • Loading branch information
radimvaculik committed Jul 19, 2022
1 parent 071f969 commit 5966803
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions assets/datagrid.js
Original file line number Diff line number Diff line change
Expand Up @@ -857,9 +857,12 @@ dataGridRegisterExtension('datagrid.fitlerMultiSelect', {
success: function() {
datagridFitlerMultiSelect();
if ($.fn.selectpicker) {
return $('.selectpicker').selectpicker({
iconBase: 'fa'
});
return $('.selectpicker')
.removeClass('form-select form-select-sm')
.addClass('form-control form-control-sm')
.selectpicker({
iconBase: 'fa'
}).selectpicker('refresh');
}
}
});
Expand Down

0 comments on commit 5966803

Please sign in to comment.