@muraldevkit/ui-toolkit 2.59.2 → 2.60.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.
|
@@ -9,7 +9,7 @@ export interface MrlSmartColumnRendererProps {
|
|
|
9
9
|
/**
|
|
10
10
|
* A function to change current sort descriptor.
|
|
11
11
|
*/
|
|
12
|
-
|
|
12
|
+
handleSortClick: ({ column, direction }: {
|
|
13
13
|
column: MrlSmartTableColumn['id'];
|
|
14
14
|
direction: MrlSortDirection;
|
|
15
15
|
}) => void;
|
|
@@ -124,6 +124,16 @@ export interface MrlSmartTableSelectionOptions {
|
|
|
124
124
|
*/
|
|
125
125
|
onSelectionChange: (keys: MrlTableSelection) => void;
|
|
126
126
|
}
|
|
127
|
+
export interface MrlTableColumnSortOptions {
|
|
128
|
+
/**
|
|
129
|
+
* The column to sort by.
|
|
130
|
+
*/
|
|
131
|
+
sortColumn: MrlSmartTableColumn;
|
|
132
|
+
/**
|
|
133
|
+
* The details of the sort.
|
|
134
|
+
*/
|
|
135
|
+
sortDescriptor: MrlTableColumnSortDescriptor;
|
|
136
|
+
}
|
|
127
137
|
export interface MrlSmartTableProps extends Partial<Pick<MrlTableProps, 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'aria-details'>> {
|
|
128
138
|
/**
|
|
129
139
|
* A list of table columns.
|
|
@@ -156,6 +166,10 @@ export interface MrlSmartTableProps extends Partial<Pick<MrlTableProps, 'aria-la
|
|
|
156
166
|
* @default ${id}-mrl-smart-table
|
|
157
167
|
*/
|
|
158
168
|
id?: string;
|
|
169
|
+
/**
|
|
170
|
+
* A function to override the default sort items when a sort descriptor is set.
|
|
171
|
+
*/
|
|
172
|
+
customSortItems?: ({ sortColumn, sortDescriptor }: MrlTableColumnSortOptions) => void;
|
|
159
173
|
}
|
|
160
174
|
/**
|
|
161
175
|
* MrlSmartTable Component
|