Empty options added when defining richSelectFilter's options

Hello,

I think I found a bug.

When using the richSelectFilter in a datatable’s column header and defining the options, I end up with some more other empty options.

You can see this behavior here: http://webix.com/snippet/744219a6

If I set no option and let it chose, it will work, as here: http://webix.com/snippet/3b770938

The same doesn’t happens if I change the component to selectFilter and chose the options, as you can see here: http://webix.com/snippet/a2ad78f2

I’m using the version 4.2.6 PRO

Hello,

I can confirm the bug. Only one empty option should be added.

For your use case, you can cancel generation of the empty option at all and provide the $empty property to your “None” option.

{  content: "richSelectFilter", emptyOption:false, options: [
          { id: '', value: "None", $empty: true },
          { id: '1994', value: '1994' },
          { id: '1974', value: '1974' },
          { id: '1964', value: '1964' }
 ] }

http://webix.com/snippet/42c0616a

After the bug is fixed (in the nearest version), you will be able to define a custom empty option easier:

{  content: "richSelectFilter", emptyOption:"None", options: [/*other options*/] }

My preferred solution is to allow the user to set any text field to empty/null by adding an “x” icon (fa-times) if the text field is not set to required = true.

This eliminates the need to have an empty option in combo boxes and rich selects. It also allows the user to conveniently clear any text derived field without having to backspace all characters.

Here is my solution: http://webix.com/snippet/507d7a12 (the code between the “begin text extension” and “end text extension”.

Maybe the webix team can add this extension so everyone can benefit from it?