@ulu/frontend-vue 0.1.2-beta.8 → 0.1.2-beta.9
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref, computed, watch, nextTick } from 'vue';
|
|
1
|
+
import { ref, computed, watch, nextTick, watchPostEffect } from 'vue';
|
|
2
2
|
import Fuse from 'fuse.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
@@ -455,12 +455,12 @@ export function useFacets(allItems, options = {}) {
|
|
|
455
455
|
};
|
|
456
456
|
|
|
457
457
|
// Initial sync from URL
|
|
458
|
-
const stopInitWatcher =
|
|
459
|
-
if (
|
|
458
|
+
const stopInitWatcher = watchPostEffect(() => {
|
|
459
|
+
if (facets.value && facets.value.length > 0) {
|
|
460
460
|
updateStateFromUrl();
|
|
461
461
|
stopInitWatcher();
|
|
462
462
|
}
|
|
463
|
-
}
|
|
463
|
+
});
|
|
464
464
|
|
|
465
465
|
// Sync state changes TO the URL
|
|
466
466
|
watch([selectedSort, searchValue, selectedFacets], updateUrlFromState, { deep: true });
|