Hi Syncfusion team,
I am attempting to create a custom sort for the swimlane rows (to make it not be sorted alphabetically but rather another key value) and came across 'sortComparer' property, however, I haven't found any documentation regarding this function as well as its function type tag leading to a broken webpage: https://ej2.syncfusion.com/documentation/api/kanban/sortComparerFunction/
Would this function give me the results that I require? If so would you be able to help me out with how to use it and add to the swimlaneSettings?
Thanks,
~Michael Mascadri
<KanbanComponent id="kanban" cssClass="kanban-swimlane" ref={(kanban) => { this.kanbanObj = kanban; }} keyField="Status" dataSource={this.data} cardSettings={{ contentField: 'Summary', headerField: 'Id' }} swimlaneSettings={{ keyField: 'Assignee', textField: 'AssigneeName', sortComparer: this.customSorting, }} height="500px" > <ColumnsDirective> <ColumnDirective headerText="To Do" keyField="Open" /> <ColumnDirective headerText="In Progress" keyField="InProgress" /> <ColumnDirective headerText="Done" keyField="Close" /> </ColumnsDirective> </KanbanComponent> customSorting(args) { args.sort((a, b) => a.textField.localeCompare(b.textField, undefined, { numeric: true }) ); return args; } |
Hi Michael Mascadri,
We have fixed the broken API link for the SortComparerFunction and refreshed it in the React Kanban component. Please review the following API link.
API Link: https://ej2.syncfusion.com/documentation/api/kanban/sortComparerFunction/