Search code examples
tablesorter

In tablesorter, dropdown list is not updated after a filter is set from other columns


I just tried on the demo page: https://mottie.github.io/tablesorter/docs/example-widget-bootstrap-theme.html

I filtered the data with: Major: math Calculus: 100

and after that only three records left that are all male students. But I still can choose female from the dropdown list for filtering Sex.

How can I update the dropdown list after I set some other filters?


Solution

  • I think what you want is to use the filter-onlyAvail class name on the header.

    After adding that class, the select in that column will only show available (visible) options for that specified column. If you look at this demo at the "Discount" column. You'll see the options are limited as filters are applied to other columns.