adminforth 2.4.0-next.296 → 2.4.0-next.298

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.
@@ -211,11 +211,17 @@
211
211
  });
212
212
 
213
213
  watch([() => currentSortField.value, () => currentSortDirection.value], () => {
214
- if (currentPage.value !== 1) currentPage.value = 1;
215
- refresh();
214
+ const needsPageReset = currentPage.value !== 1;
215
+ if (needsPageReset) {
216
+ currentPage.value = 1;
217
+ } else {
218
+ refresh();
219
+ }
216
220
  emit('update:sortField', currentSortField.value);
217
221
  emit('update:sortDirection', currentSortField.value ? currentSortDirection.value : undefined);
218
- emit('sort-change', { field: currentSortField.value, direction: currentSortDirection.value });
222
+ const field = currentSortField.value ?? null;
223
+ const direction = currentSortField.value ? currentSortDirection.value : null;
224
+ emit('sort-change', { field, direction });
219
225
  }, { immediate: false });
220
226
 
221
227
  const totalPages = computed(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "2.4.0-next.296",
3
+ "version": "2.4.0-next.298",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",