mirror of
https://github.com/directus/directus.git
synced 2026-01-27 19:17:55 -05:00
@@ -179,15 +179,13 @@ export function useItems(collection: Ref<string>, query: Query) {
|
||||
|
||||
items.value = fetchedItems;
|
||||
|
||||
if (itemCount.value === null) {
|
||||
itemCount.value = response.data.data.length;
|
||||
itemCount.value = response.data.data.length;
|
||||
|
||||
if (response.data.data.length === limit.value) {
|
||||
// Requesting the page filter count in the actual request every time slows
|
||||
// the request down by like 600ms-1s. This makes sure we only fetch the count
|
||||
// once if needed.
|
||||
getItemCount();
|
||||
}
|
||||
if (response.data.data.length === limit.value) {
|
||||
// Requesting the page filter count in the actual request every time slows
|
||||
// the request down by like 600ms-1s. This makes sure we only fetch the count
|
||||
// once if needed.
|
||||
getItemCount();
|
||||
}
|
||||
} catch (err) {
|
||||
error.value = err;
|
||||
|
||||
Reference in New Issue
Block a user