SortHandler
Since v0.2.7
Custom sort handler function signature.
Use SortHandler only when you need to replace the grid’s sort engine
wholesale.
type SortHandler = (rows: TRow[], sortState: SortState, columns: ColumnConfig<TRow>[]) => TRow[] | Promise<TRow[]>Example
Section titled “Example”// Replace the built-in sort with a third-party stable sort libraryconst customSortHandler: SortHandler<Employee> = (rows, state) => { return thirdPartyStableSort(rows, state.field, state.direction);};
grid.gridConfig = { sortHandler: customSortHandler };See Also
Section titled “See Also”SortStatefor the sort state objectGridConfig.sortHandlerfor configuring the handler (and its caveats)BaseColumnConfig.sortComparator— recommended per-column comparator
AI assistants: For complete API documentation, implementation guides, and code examples for this library, see https://raw.githubusercontent.com/OysteinAmundsen/toolbox/main/llms-full.txt