serverSelectFilter not populating the list correctly

serverSelectFilter populates some of the values, but not all of the options. Here is what happens.

Let us say my database has three different categories A, B, C. I am using pagination and when the datatable loads, the first page with all have records all from category A, which is fine. But the serverSelectFilter shows only one option, which is A. It does not show options B and C.

When I navigate to page 2 in the datatable which has records from A and B, now the serverSelectFilter has two options A and B.

If I go back to page 1, the serverSelectFilter will have options A and B since it has already seen those two options.

I am expecting the serverSelectFilter to show me all categories. It is probably better to use selectFilter, but give it a predefined list of options.

Any ideas?

you should either define custom proxy for options or load all distinct values and set them as options.

If the filter’s options aren’t specified, filter gathers the available data.

You can set all options on the client side, as follows:

http://webix.com/snippet/a9270ac5

Or load the options from the server. See the code of the example:

http://docs.webix.com/samples/15_datatable/03_filtering/12_options_loading.html

serverSelectFilter inherits from the selectFilter, so the both solutions will work.

Hi,

For the second solution better would be to make one request for all filters. Imagine if you have 30 columns from which 20 of them have serverSide filtering.

I’ve a peculiar issue. I’ve a data table with columns having combo editor. i’ve filters too. unfortunately, the filter shows all the values from combo editor. i don’t want all those values, but what are on the current page. how can it be achieved? can anyone guide me? i don’t want another call to get all the filters, because the data itself contains the filter data too. neither want to write a code to create an array of {id: , value:}, because it is a performance hit.

i guess, there must be an option to control this (like filterMode),