sortable.svelte.ts view source
<T extends Cell<any>>(key: string, label: string, field: keyof T, direction?: "asc" | "desc"): Sorter<T> Create a numeric sorter with optional direction. Falls back to cell's cid for equal values.
key
stringlabel
stringfield
keyof Tdirection
"asc" | "desc"'asc'returns
Sorter<T>