EnhanceTableOptions: {
    compare?: (a: string, b: string, column: string) => number;
    defaultValue?: SortState | null;
    onValueChange?: (value: SortState | null) => void;
}

Options for enhanceTable.

Type declaration

  • Optionalcompare?: (a: string, b: string, column: string) => number

    Compare two cell values for column. Defaults to numeric comparison when both parse as numbers, else locale-aware string comparison.

  • OptionaldefaultValue?: SortState | null

    Initial sort. Falls back to a header already marked aria-sort in the markup (server-rendered order); null leaves the rows as authored.

  • OptionalonValueChange?: (value: SortState | null) => void

    Called with the new sort after every change (null when cleared).