@aures5g/vue-component-library 3.65.0 → 3.66.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type SortDirections } from './uiTable.const';
|
|
2
|
+
export type SortState = {
|
|
3
|
+
field: string;
|
|
4
|
+
direction: SortDirections;
|
|
5
|
+
} | null;
|
|
6
|
+
/**
|
|
7
|
+
* Pure state machine for the header sort click cycle (Bug #76979).
|
|
8
|
+
*
|
|
9
|
+
* Single-column sort: clicking a column other than the currently sorted one
|
|
10
|
+
* always starts that column fresh at DESC and drops the previous column's
|
|
11
|
+
* sort — the direction is never inherited from another field. Clicking the
|
|
12
|
+
* SAME column cycles DESC -> ASC -> off (null); off -> DESC restarts it. The
|
|
13
|
+
* caller (TableHeaderRow.vue) reads `current` from its own `sortModel` and
|
|
14
|
+
* feeds the clicked field name; the parent's `sortModel` setter already
|
|
15
|
+
* treats `null` as "reset to the view's default sort".
|
|
16
|
+
*/
|
|
17
|
+
export declare function nextSortState(current: SortState, clickedField: string): SortState;
|