@pantheon-systems/pds-toolkit-react 2.0.0-alpha.22 → 2.0.0-alpha.24
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.
- package/dist/components/Table/Table.d.ts +11 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +823 -810
- package/dist/index.js.map +1 -1
- package/dist/index.source.d.ts +1 -1
- package/package.json +1 -1
- /package/dist/components/{Skiplink → links/Skiplink}/Skiplink.d.ts +0 -0
|
@@ -4,10 +4,15 @@ export type SortOrder = 'asc' | 'desc';
|
|
|
4
4
|
export interface TableColumn {
|
|
5
5
|
/** Content to display in the header cell. */
|
|
6
6
|
header: ReactNode;
|
|
7
|
-
/** Stable identifier used for
|
|
7
|
+
/** Stable identifier used for rendering cell content from rowData. */
|
|
8
8
|
id: string;
|
|
9
9
|
/** When true, renders a sort button next to the header label. */
|
|
10
10
|
sortable?: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Key to use for sorting instead of `id`. Use when the cell renders a
|
|
13
|
+
* ReactNode but a separate plain-text field in rowData should drive the sort.
|
|
14
|
+
*/
|
|
15
|
+
sortKey?: string;
|
|
11
16
|
}
|
|
12
17
|
export interface TableProps extends ComponentPropsWithoutRef<'table'> {
|
|
13
18
|
/** Additional class names */
|
|
@@ -21,6 +26,8 @@ export interface TableProps extends ComponentPropsWithoutRef<'table'> {
|
|
|
21
26
|
currentPage?: number;
|
|
22
27
|
/**
|
|
23
28
|
* Column id to sort by on initial render. Only applies in uncontrolled sort mode.
|
|
29
|
+
* Like `defaultValue` in HTML inputs, this is mount-only — changing it after mount
|
|
30
|
+
* has no effect. Use `sortKey` + `onSort` for controlled sort.
|
|
24
31
|
*/
|
|
25
32
|
defaultSortKey?: string;
|
|
26
33
|
/**
|
|
@@ -96,6 +103,9 @@ export interface TableProps extends ComponentPropsWithoutRef<'table'> {
|
|
|
96
103
|
/**
|
|
97
104
|
* Callback fired when row selection changes. Providing this prop enables
|
|
98
105
|
* the checkbox column. Receives the full array of currently selected row IDs.
|
|
106
|
+
* Note: in uncontrolled selection mode, IDs of rows removed from `rowData`
|
|
107
|
+
* (e.g. after filtering) remain in the internal selection set. Clear selection
|
|
108
|
+
* explicitly when filtering if stale IDs are a concern.
|
|
99
109
|
*/
|
|
100
110
|
onRowSelectionChange?: (ids: string[]) => void;
|
|
101
111
|
/**
|