We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f11fd8c commit 92c3685Copy full SHA for 92c3685
adminforth/spa/src/afcl/Table.vue
@@ -211,11 +211,12 @@
211
});
212
213
watch([() => currentSortField.value, () => currentSortDirection.value], () => {
214
- if (currentPage.value !== 1) currentPage.value = 1;
215
refresh();
216
emit('update:sortField', currentSortField.value);
217
emit('update:sortDirection', currentSortField.value ? currentSortDirection.value : undefined);
218
- emit('sort-change', { field: currentSortField.value, direction: currentSortDirection.value });
+ const field = currentSortField.value ?? null;
+ const direction = currentSortField.value ? currentSortDirection.value : null;
219
+ emit('sort-change', { field, direction });
220
}, { immediate: false });
221
222
const totalPages = computed(() => {
0 commit comments