@stimulus-library/controllers
Version:
A library of useful controllers for Stimulus
21 lines (20 loc) • 722 B
TypeScript
import { BaseController } from "@stimulus-library/utilities";
export declare class TableSortController extends BaseController {
static values: {
startSort: NumberConstructor;
};
readonly startSortValue: number;
readonly hasStartSortValue: boolean;
_lastIndex: number | null;
_reverse: boolean;
get _tableHead(): HTMLTableSectionElement;
get _tableHeaders(): HTMLTableCellElement[];
get _tableBody(): HTMLTableSectionElement;
get _tableRows(): HTMLTableRowElement[];
connect(): void;
sort(event_or_target: Event | HTMLTableCellElement): void;
private _indexOfHeaderCell;
private _headerCellByIndex;
private _otherHeaderCells;
private _sortByColumn;
}