UNPKG

@spaced-out/ui-design-system

Version:
15 lines 689 B
import type { GenericObject } from '../../components/Table/Table'; export type SortDirection = 'asc' | 'desc' | 'original'; export declare function useSortableEntries<T extends GenericObject>(entries: Array<T>, idName: keyof T, { defaultSortKey, defaultSortDirection, onSort, enableInternalSorting, }: { defaultSortKey?: keyof T; defaultSortDirection?: SortDirection; onSort?: (sortKey: string, sortDirection: SortDirection) => unknown; enableInternalSorting?: boolean; }): { handleSortClick: (sortKey: keyof T) => unknown; sortDirection: SortDirection; sortKey?: string; sortedEntries: T[]; sortedKeys: keyof T[]; }; //# sourceMappingURL=hooks.d.ts.map