Fix previous instance page index and sort order

This commit is contained in:
Natsumi
2026-02-04 15:50:25 +13:00
committed by pa
parent 37dda6962d
commit 66a5a1ff15
6 changed files with 115 additions and 17 deletions

View File

@@ -176,6 +176,10 @@
type: Function,
default: null
},
onSortChange: {
type: Function,
default: null
},
onRowClick: {
type: Function,
default: null
@@ -323,6 +327,14 @@
}
});
const sortBy = computed(() => props.table.getState?.().sorting ?? []);
watch(sortBy, (newSorting) => {
if (props.onSortChange) {
props.onSortChange(newSorting);
}
});
watch([currentPage, pageSizeProxy], async () => {
await nextTick();
if (tableScrollRef.value) {