Removing an option from RichSelect

Is it possible to remove one/more option(s) from richselect programatically by using certain given parameter (instead using its ID or index position)?

Here is my snippet including the remark of what I'm about to achieve:
https://snippet.webix.com/3fykmmlb

And also, is it possible to put a different color for an option based on specific parameter (such as "is_active" in my case).

Thank you guys!

Tagged:

Comments

  • Hello, @tengkie

    Dropdown of richselect can be considered as a popup with a list inside, so all data-related actions (loading, etc.) has to be performed on this list.

    There is a possibility to add different colors to the options. You could perform that with options template.

    Every UI component features inner storage for loaded data. It is possible to apply methods directly to the DataStore of the component and process it's items:

    $$("list").data.each(function(obj){...})
    

    Here is the snippet: https://snippet.webix.com/k7k1ao7r

  • Nicely done. Thank you @AlenaLisava .

    I just found out that using .serialize() also works on richselect.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!