UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

52 lines (51 loc) 1.45 kB
import { type Dispatch, type SetStateAction } from "react"; import type { SortItem } from "../+types.js"; import type { Grid } from "../../+types"; export interface SortRowItem { readonly isCustom: boolean; readonly columnItem: { value: string; label: string; } | null; readonly index: number; readonly columnOptions: { value: string; label: string; }[]; readonly columnSelected: { value: string; label: string; } | null; readonly columnOnSelect: (c: { value: string; label: string; } | null) => void; readonly sortOptions: { value: string; label: string; }[]; readonly sortSelected: { value: string; label: string; } | null; readonly sortOnSelect: (c: { value: string; label: string; } | null) => void; readonly sortDirectionOptions: { value: string; label: string; }[]; readonly sortDirectionSelected: { value: string; label: string; } | null; readonly sortDirectionOnSelect: (c: { value: string; label: string; } | null) => void; readonly canAdd: boolean; readonly onAdd: () => void; readonly onDelete: () => void; } export declare function useSortRowItems(sortItems: SortItem[], setSortItems: Dispatch<SetStateAction<SortItem[]>>, grid: Grid<any>, pivotMode: boolean): SortRowItem[];