Bootstrap-table: Select2-filter + column sort doesn't work

Created on 26 Sep 2016  路  3Comments  路  Source: wenzhixin/bootstrap-table

Hi everyone.
First of all, congratulations for the API. It is awesome to work with Bootstrap Table.

Today I discovered the Select2-Filter extention but when I tried to use it I had some problems.

When I set the table to add Select2-Filter the column sorting didn't work.
It starts working again if I type something in the select2 filter (eg. the letter b). When there are something typed in the select2 filter the sorting works as usual.

Example: http://jsfiddle.net/p7qkw4by/

Working:
image

Doesn't
image

I'll be gratefull if someone could help me.

Thanks.

Most helpful comment

Hi everyone,
I fixed this issue on bootstrap-select2-filter ver 1.1.0 ,
please reference this link

All 3 comments

Same problem here, thats why i am looking through the issues...
I first found this issue too while looking at select2-filter
Could chase the problem down to the initSearch() function. It gets called at many places. for example when calling resetSearch like this $('#table').bootstrapTable('resetSearch');
or after changing the input in the search box... many places.

But when the searchtext is "" (empty string) and initSearch() function is getting called, sorting stops working. Give it a try: fill in some search text, empty it and try to sort. doesn't work for me.
Also after loading new data in the background into the table, when search field is empty, sorting stops working right there.

edit: to clearyfy: this issue can only be observed, while the bootstrap-table-select2-filter.js is loaded. If its not present, sorting works after emptying the search box / loading and stuff...

same issue for me

Hi everyone,
I fixed this issue on bootstrap-select2-filter ver 1.1.0 ,
please reference this link

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vickyrathee picture vickyrathee  路  3Comments

iamthestreets picture iamthestreets  路  5Comments

sbellani picture sbellani  路  4Comments

yungwei picture yungwei  路  5Comments

ME-at-GH picture ME-at-GH  路  3Comments