Custom selectFilter for datatable doesn't work

Hello,
I modified a previous snippet from another post that showed how to build a custom filter for a datatable.
The original code was for the “Rank” field, and it works OK (if you select e.g. Rank=2 from the search dropdown, the table is filtered to only show the record with Rank=2).
So I just added the same code for a second field (Year). But this one doesn’t work. If you pick a Year, the table always shows blank.
Snippet is at:
https://snippet.webix.com/483dwb9p

What is the difference in the Year column that makes filtering fail ?

Thanks.

Hello @nikos,

So I just added the same code for a second field (Year). But this one doesn’t work. If you pick a Year, the table always shows blank.
You need to define options as:

{content:"selectFilter", options:[{id:"year" value:"year"}] }

Please check the following snippet:
https://snippet.webix.com/2oqro8mz

Thank you @annazankevich

Works perfectly.

May I offer a suggestion for improving the documentation:

I looked at all relevant help pages (I believe), but I could not find it clarified anywhere that in the options object of a multiselect control, “id” is the value that is looked-up, and “value” is the display string.

I assumed that “id” is the “key” in the “key-value” pair, and that “value” would be the value being searched.

Just a note in the documentation clarifying the above would help (unless it’s there and I missed it).

Thanks again for your help.

@nikos,
Thank you for suggestion. We will add it.
At the moment you can find this information here.