richselect - options sort

Hi,

I use richselect in datatable and need to sort options by value.
https://snippet.webix.com/mq1xn2z5

Thank

Hello @nkm ,
As a solution, you can try to specify the initial sorting rule use the extended configuration:

    options: {
      body: {
    //view:"list" is not necessary
        scheme: {
          $sort: {
            by: "value",
            dir: "asc",
            as: "string"
          }
        },
        data: [
          { id:1, value:"Banana" }, 
          { id:2, value:"Papaya" }, 
          { id:3, value:"Apple" }
        ]
      }
    }

Please check the next snippet:
https://snippet.webix.com/glwzjfuz

Or you can dynamically sort the component using the sort() method:

$$("richselect1").getList().sort("#value#","desc");

Example:
https://snippet.webix.com/llu26uei

Thank you @annazankevich