UI: Fixed count issue for delete modal (#9430)

This commit is contained in:
Shailesh Parmar 2022-12-20 20:10:09 +05:30 committed by GitHub
parent cadfb68826
commit 039e115bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -267,7 +267,7 @@ export const getAdvancedFieldDefaultOptions = (
export const getEntityCount = async (
path: string,
database?: string
): Promise<AxiosResponse<{ paging: Paging }>> => {
): Promise<{ paging: Paging }> => {
const params = { database, limit: 0 };
const response = await APIClient.get(`/${path}`, { params });

View File

@ -657,7 +657,7 @@ export const setServiceSchemaCount = (
let count = 0;
results.forEach((result) => {
if (result.status === PROMISE_STATE.FULFILLED) {
count += result.value.data?.paging?.total || 0;
count += result.value?.paging?.total || 0;
}
});
callback(count);
@ -678,7 +678,7 @@ export const setServiceTableCount = (
let count = 0;
results.forEach((result) => {
if (result.status === PROMISE_STATE.FULFILLED) {
count += result.value.data?.paging?.total || 0;
count += result.value?.paging?.total || 0;
}
});
callback(count);