lukaskral / bootstrap-table-filter

MIT License
48 stars 39 forks source link

Filters don't update table after clicking apply #6

Open laplasianin opened 9 years ago

laplasianin commented 9 years ago

Hello! Last version of filters seems broken - it does nothing after clicking on apply button (no errors on console)

http://plnkr.co/edit/XA0kUc?p=preview - your plnkr's you attached to https://github.com/lukaskral/bootstrap-table-filter/issues/3 is not working.

http://plnkr.co/edit/JkRMZt?p=preview - this one you attached to https://github.com/lukaskral/bootstrap-table-filter/issues/5 works, but if I add pagination (data-pagination="true") - it's not working again

Also examples attached to github repo behave like plnkr 1.

bootstrap-filters look very usefull but I can't use it, could you please investigate this issue.

thx

laplasianin commented 9 years ago

temporary fixed this by adding filter params manually like this:

$table = $('#clients-table').bootstrapTable(
    {
        queryParams: function(params) {

            var values = $('#filter-bar').bootstrapTableFilter('getData');
            if ( !jQuery.isEmptyObject(values)) {
                params['filter'] = JSON.stringify(values);
            }

            return params;
        }
    }
);

but it looks ugly