question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

filter-control modify sort when search on column

See original GitHub issue

Hi,

With filter-control extension activated, when I search in filter input of the column, the sort I previously set change and bootstrapTable sort now on the column in which I enter text in input.

filter-control-clear-filter-bug

My settings are listed bellow :

dtTable = $table.bootstrapTable({
            toolbar: "#table-toolbar",
            showRefresh: true,
            search: false,
            searchAlign: 'right',
            searchTimeOut: 200,
            showToggle: false,
            showColumns: true,
            ajax: _ajaxTableCall,
            sidePagination: 'server',
            pagination: true,
            pageSize: 50,
            clickToSelect: false,
            pageList: [50, 100, 500, 1000],
            buttonsClass: 'outline',
            filterControl: true,
            filterShowClear: true,
            searchOnEnterKey: true,
            cookie: true,
            cookieIdTable: 'priceListId',
            searchFormatter: false,
            formatShowingRows: function (pageFrom, pageTo, totalRows) {
                return pageFrom + ' à ' + pageTo + ' sur ' + totalRows + ' tarifs';
            },
            formatRecordsPerPage: function (pageNumber) {
                return pageNumber + " tarifs visibles";
            },
            onLoadSuccess: function (datas) {
                _setColumnsVisibility();
            },
            iconsPrefix: 'fa',
            icons: {
                refresh: 'fa-refresh',
                toggle: 'fa-th-list',
                columns: 'fa-columns',
                detailOpen: 'fa-plus-circle',
                detailClose: 'fa-minus-circle',
                clear: 'fa-filter'
            },
            columns: [
                [
                    {
                        field: 'state',
                        checkbox: true,
                        align: 'center',
                        valign: 'middle',
                        switchable: false,
                        searchable: false,
                    },
                    {
                        title: 'Statut',
                        field: 'status',
                        align: 'center',
                        valign: 'middle',
                        sortable: true,
                        switchable: true,
                        formatter: _statusFormatter
                    },
                    ...
               ]
           ]
});

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:6

github_iconTop GitHub Comments

1reaction
djhvscfcommented, Dec 31, 2018

Please provide a jsFiddle to show your problem, thanks!

0reactions
UtechtDustincommented, Apr 4, 2019

Duplicate #3073

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change sorting order of the columns in the filter control
Hello in previous versions of the gridview, the names of the columns in the order were sorted, in the filter dialog, as occurred...
Read more >
Table Filter Control - Bootstrap Table
Set to true to sort the option elements of the select control. Default: false. Column options. filterControl. Attribute: data-filter ...
Read more >
Sorting of Filters - Searchanise Documentation
Change the sorting of the particular filter values · Go to the Searchanise (Smart Search & Filter) control panel > Filters section >...
Read more >
How to change the column filter control in R Shiny DataTables
When you click the search boxes, you may see different controls: For numeric/date/time columns, range sliders are used to filter rows within ...
Read more >
bootstrap-table - UNPKG
31, - **Update:** Fixed `sort` cannot work after searching. ... 49, - **New(fixed-columns):** Added support for using filter-control extension.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found