Last eslint tweak (#18198)

* Should be there now

* Format
This commit is contained in:
Rijk van Zanten
2023-04-14 17:40:50 -04:00
committed by GitHub
parent 37658802b7
commit c48309ab68
293 changed files with 1627 additions and 1 deletions

View File

@@ -11,6 +11,7 @@ import { useCollection } from './use-collection.js';
const mockData = { id: 1 };
const mockCountData = { count: 2 };
const mockCountDistinctData = { countDistinct: { id: 3 } };
const mockPrimaryKeyField: Field = {
collection: 'test_collection',
field: 'id',
@@ -19,6 +20,7 @@ const mockPrimaryKeyField: Field = {
schema: null,
meta: null,
};
const mockApiGet = vi.fn();
const mockApiPost = vi.fn();
@@ -50,6 +52,7 @@ vi.mock('./use-system.js', () => ({
post: mockApiPost,
})),
}));
vi.mock('./use-collection.js');
afterEach(() => {

View File

@@ -63,6 +63,7 @@ export function useItems(collection: Ref<string | null>, query: ComputedQuery):
total: null,
filter: null,
};
let loadingTimeout: NodeJS.Timeout | null = null;
const fetchItems = throttle(getItems, 500);
@@ -250,6 +251,7 @@ export function useItems(collection: Ref<string | null>, query: ComputedQuery):
const count = primaryKeyField.value
? Number(response.data.data[0].countDistinct[primaryKeyField.value.field])
: Number(response.data.data[0].count);
existingRequests.total = null;
totalCount.value = count;
@@ -287,6 +289,7 @@ export function useItems(collection: Ref<string | null>, query: ComputedQuery):
const count = primaryKeyField.value
? Number(response.data.data[0].countDistinct[primaryKeyField.value.field])
: Number(response.data.data[0].count);
existingRequests.filter = null;
itemCount.value = count;