@siemens/ngx-datatable
Version:
ngx-datatable is an Angular table grid component for presenting large and complex data.
18 lines (17 loc) • 955 B
TypeScript
import { Group, SortDirection, SortPropDir, SortType } from '../types/public.types';
import { TableColumnInternal } from '../types/internal.types';
/**
* Gets the next sort direction
*/
export declare function nextSortDir(sortType: SortType, current: SortDirection | 'desc' | 'asc' | undefined): SortDirection | undefined;
/**
* Adapted from fueld-ui on 6/216
* https://github.com/FuelInteractive/fuel-ui/tree/master/src/pipes/OrderBy
*/
export declare function orderByComparator(a: any, b: any): number;
/**
* creates a shallow copy of the `rows` input and returns the sorted copy. this function
* does not sort the `rows` argument in place
*/
export declare function sortRows<TRow>(rows: TRow[], columns: TableColumnInternal[], dirs: SortPropDir[]): TRow[];
export declare function sortGroupedRows<TRow>(groupedRows: Group<TRow>[], columns: TableColumnInternal[], dirs: SortPropDir[], sortOnGroupHeader: SortPropDir | undefined): Group<TRow>[];