@invopop/popui 0.1.4-beta.30 → 0.1.4-beta.32
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.
|
@@ -119,15 +119,6 @@
|
|
|
119
119
|
pagination.pageIndex = initialPage
|
|
120
120
|
})
|
|
121
121
|
|
|
122
|
-
// Sync sorting state with initialSort props (for manual sorting updates)
|
|
123
|
-
$effect(() => {
|
|
124
|
-
if (initialSortColumn && initialSortDirection) {
|
|
125
|
-
sorting = [{ id: initialSortColumn, desc: initialSortDirection === 'desc' }]
|
|
126
|
-
} else {
|
|
127
|
-
sorting = []
|
|
128
|
-
}
|
|
129
|
-
})
|
|
130
|
-
|
|
131
122
|
// Reorder initial frozen columns on mount
|
|
132
123
|
$effect(() => {
|
|
133
124
|
if (initialFrozenColumns.length > 0 && columnOrder.length === 0) {
|
|
@@ -404,14 +395,9 @@
|
|
|
404
395
|
showSortOptions={column.getCanSort()}
|
|
405
396
|
showFilterOption={!column.columnDef.disableColumnFilter}
|
|
406
397
|
onOrderBy={(direction) => {
|
|
407
|
-
|
|
408
|
-
if (!manualSorting) {
|
|
409
|
-
column.toggleSorting(direction === 'desc')
|
|
410
|
-
}
|
|
411
|
-
// Reset to first page when sorting changes (same as page size change)
|
|
398
|
+
column.toggleSorting(direction === 'desc')
|
|
412
399
|
if (manualPagination) {
|
|
413
400
|
table.setPageIndex(0)
|
|
414
|
-
onPageChange?.(1)
|
|
415
401
|
}
|
|
416
402
|
if (onSortingChange) {
|
|
417
403
|
onSortingChange(column.id, direction)
|