How to add a "Show all" item into the richSelectFilter?

I want add a “Show all” item into the richSelectFilter, to reset a filter.


header:["title",  {content:"richSelectFilter",options:[
                {id:0, value:"a"},
                {id:1, value:"b"},
                {id:2, value:"c"},
                {id:3, value:"d"}
            ]}],

Thanks!

You can add an extra option with custom id, and add “prepare” section to the filter, where you can describe that for this custom id filter must show all records.

          prepare:function(a, b){ 
            if (a == -1) return "";
            return webix.ui.datafilter.richSelectFilter.prepare(a,b);
          },
          options:[ { id:-1, value:"Show All"},

http://webix.com/snippet/ad160012

It’s work! Thank you maksim.

Old question, but same subject. It would be possible to have a showAll and still load the options dynamically from the table’s options as the selectfilter does (It has an empty option)

Hi,

Check the next snippet - http://webix.com/snippet/648229b2
It possible to use onCollectValues event to alter list of autogenerated options.