After looking at this answer from @Oleg, I would like to know how we can update the filter toolbar after a search has been performed.
For example:
In Oleg's example, if you select the Sport option from the Category dropdown, the Subcategory dropdown still has Football, Formula 1, Mathematics and Physics as options even though they are not shown in the grid after the search.
How can we update that code so that, for example, when I select Sport from the Category dropdown, the filter toolbar is updated so that the dropdowns only have options from the new set of data after the search?
I've been trying to "refresh" or "update" the filter toolbar after a search has been performed, but I can't figure out how to do this.