chore: Hide pagination for empty company list (#12920)

This commit is contained in:
Sivin Varghese
2025-11-21 12:23:01 +05:30
committed by GitHub
parent 51fbf583b6
commit 45fa697885
2 changed files with 3 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ defineProps({
totalItems: { type: Number, default: 100 },
activeSort: { type: String, default: 'name' },
activeOrdering: { type: String, default: '' },
showPaginationFooter: { type: Boolean, default: true },
});
const emit = defineEmits(['update:currentPage', 'update:sort', 'search']);
@@ -36,7 +37,7 @@ const updateCurrentPage = page => {
<slot name="default" />
</div>
</main>
<footer class="sticky bottom-0 z-0 px-4 pb-4">
<footer v-if="showPaginationFooter" class="sticky bottom-0 z-0 px-4 pb-4">
<PaginationFooter
current-page-info="COMPANIES_LAYOUT.PAGINATION_FOOTER.SHOWING"
:current-page="currentPage"

View File

@@ -136,6 +136,7 @@ onMounted(() => {
:active-sort="activeSort"
:active-ordering="activeOrdering"
:is-fetching-list="isFetchingList"
:show-pagination-footer="!!companies.length"
@update:current-page="onPageChange"
@update:sort="handleSort"
@search="onSearch"