qdadm 0.26.0 → 0.26.1

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qdadm",
3
- "version": "0.26.0",
3
+ "version": "0.26.1",
4
4
  "description": "Vue 3 framework for admin dashboards with PrimeVue",
5
5
  "author": "quazardous",
6
6
  "license": "MIT",
@@ -1,4 +1,4 @@
1
- import { ref, computed, watch, onMounted, inject, provide } from 'vue'
1
+ import { ref, computed, watch, onMounted, inject, provide, nextTick } from 'vue'
2
2
  import { useRouter, useRoute } from 'vue-router'
3
3
  import { useToast } from 'primevue/usetoast'
4
4
  import { useConfirm } from 'primevue/useconfirm'
@@ -170,6 +170,7 @@ export function useListPageBuilder(config = {}) {
170
170
  const loading = ref(false)
171
171
  const selected = ref([])
172
172
  const deleting = ref(false)
173
+ let isRestoringFilters = false // Flag to skip watch during restore
173
174
 
174
175
  // Pagination (load from cookie if available)
175
176
  const page = ref(1)
@@ -899,6 +900,8 @@ export function useListPageBuilder(config = {}) {
899
900
  * Restore filter values from URL query params (priority) or session storage
900
901
  */
901
902
  function restoreFilters() {
903
+ isRestoringFilters = true // Prevent watch from triggering during restore
904
+
902
905
  // Priority 1: URL query params
903
906
  const urlFilters = {}
904
907
  for (const key of filtersMap.value.keys()) {
@@ -938,6 +941,11 @@ export function useListPageBuilder(config = {}) {
938
941
  filterValues.value[name] = value
939
942
  }
940
943
  }
944
+
945
+ // Reset flag after Vue processes updates
946
+ nextTick(() => {
947
+ isRestoringFilters = false
948
+ })
941
949
  }
942
950
 
943
951
  // ============ ACTIONS ============
@@ -1234,6 +1242,8 @@ export function useListPageBuilder(config = {}) {
1234
1242
  // ============ WATCHERS ============
1235
1243
  let searchTimeout = null
1236
1244
  watch(searchQuery, () => {
1245
+ // Skip watch during restore (loadItems will be called after restore)
1246
+ if (isRestoringFilters) return
1237
1247
  clearTimeout(searchTimeout)
1238
1248
  searchTimeout = setTimeout(() => {
1239
1249
  // Use onFiltersChanged to also sync URL params