richselect - options sort


I use richselect in datatable and need to sort options by value.



  • edited April 29

    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:

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



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!