Fix collection race condition + search pagination (#540)

This commit is contained in:
Rijk van Zanten
2020-05-08 16:51:14 -04:00
committed by GitHub
parent c08d9ccfe2
commit 45c01b6a64
3 changed files with 4 additions and 3 deletions

View File

@@ -39,8 +39,9 @@ export function useCollectionPreset(
}
}, 450);
watch(collection, initLocalPreset);
watch(bookmark, initLocalPreset);
watch([collection, bookmark], () => {
initLocalPreset();
});
const viewOptions = computed<Record<string, any>>({
get() {

View File

@@ -208,6 +208,7 @@ export function useItems(collection: Ref<string>, query: Query) {
limit: 0,
fields: primaryKeyField.value.field,
meta: 'filter_count,total_count',
q: searchQuery.value,
...filtersToQuery(filters.value),
},
});

View File

@@ -99,7 +99,6 @@
v-else
class="layout"
ref="layout"
:key="$route.fullPath"
:is="`layout-${viewType || 'tabular'}`"
:collection="collection"
:selection.sync="selection"