Filter Control and hide-unused-select-options for dropdown list dependent.

Author: francogiacobbiCreated Apr 5, 2023Updated May 13, 2026
Labelshelp-wantedfilter-control

Description

As i suggested for https://github.com/wenzhixin/bootstrap-table/issues/6702 issue, i've put hideUnusedSelectOptions to change items in second (and third etc) dropdown list dependent by the choice operated in the first Select Control of filter. Now i've a strange situation, with two pages there're two different behaviors. In the first Page all is ok. In the second page the second dropdown list states always all options value and not only those dependent on first choice. Both versions is 1.21.2.

Now i would try to develop a personal filter control filling.

The question is which is the event where i can capture filter selection with resulting filtered data where i can manipulate data.

I've seen event 'column-search.bs.table' but it runs also when table is going to be created. Capturing 'column-search.bs.table' as name parameter in 'all.bs.table' after onPostBody event i get only filtered data as i want.

Now which is the best approach to resolve this type of problem.

Continuing with hideUnusedSelectOptions or develop a personal filter control filling method to fill options in SELECT.

Example(s)

No response

Source: wenzhixin/bootstrap-table