@siemens/ngx-datatable
Version:
ngx-datatable is an Angular table grid component for presenting large and complex data.
18 lines (17 loc) • 992 B
TypeScript
import { TableColumnInternal } from '../types/internal.types';
import { Group, SortDirection, SortPropDir, SortType } from '../types/public.types';
/**
* Gets the next sort direction
*/
export declare const 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 const 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 const sortRows: <TRow>(rows: TRow[], columns: TableColumnInternal[], dirs: SortPropDir[], sortOnGroupHeader?: SortPropDir) => TRow[];
export declare const sortGroupedRows: <TRow>(groupedRows: Group<TRow>[], columns: TableColumnInternal[], dirs: SortPropDir[], sortOnGroupHeader: SortPropDir | undefined) => Group<TRow>[];