JavaScript UI Libraries & Blazor Components Suite – Smart UI Forums Kanban Programmatically Sort with addSort() by multiple DataFields

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #104548
    JS_NVM
    Participant

    I try to add sorting to the kanban programmatically in Angular.

    I can add a single sorting by use .addSort(“dataField1″,”ascending”), there is no problem. I know it is possible to sort by multiple dataFields and the documentation says I could use something like .addSort([“dataField1”, “dataField2”], [“ascending”,”ascending”]) but if I use this code I get an error:

    “Argument of type ‘[string, string]’ is not assignable to parameter of type ‘string | []’.
    Type ‘[string, string]’ is not assignable to type ‘string’.”

    What I’m doing wrong, can somebody help please? Thanks in advance

    #104551

    Hi,

    Thank you for reporting that, it is a problem on our side!
    Here is a workaround for it: https://stackblitz.com/edit/github-r7q5ul?file=src/app/app.component.ts
    Just set the arrays as any

    I hope this helps

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

    #104552
    JS_NVM
    Participant

    Ah yes, that’s the fix. Thank you, helped a lot!

    #104568

    Hi,

    You are welcome!
    If you face any difficulties, do not hesitate to contact us!

    Best Regards,
    Svetoslav Borislavov

    Smart UI Team
    https://www.htmlelements.com/

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.