chore: Hide pagination for empty company list (#12920)
This commit is contained in:
@@ -9,6 +9,7 @@ defineProps({
|
|||||||
totalItems: { type: Number, default: 100 },
|
totalItems: { type: Number, default: 100 },
|
||||||
activeSort: { type: String, default: 'name' },
|
activeSort: { type: String, default: 'name' },
|
||||||
activeOrdering: { type: String, default: '' },
|
activeOrdering: { type: String, default: '' },
|
||||||
|
showPaginationFooter: { type: Boolean, default: true },
|
||||||
});
|
});
|
||||||
|
|
||||||
const emit = defineEmits(['update:currentPage', 'update:sort', 'search']);
|
const emit = defineEmits(['update:currentPage', 'update:sort', 'search']);
|
||||||
@@ -36,7 +37,7 @@ const updateCurrentPage = page => {
|
|||||||
<slot name="default" />
|
<slot name="default" />
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</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
|
<PaginationFooter
|
||||||
current-page-info="COMPANIES_LAYOUT.PAGINATION_FOOTER.SHOWING"
|
current-page-info="COMPANIES_LAYOUT.PAGINATION_FOOTER.SHOWING"
|
||||||
:current-page="currentPage"
|
:current-page="currentPage"
|
||||||
|
|||||||
@@ -136,6 +136,7 @@ onMounted(() => {
|
|||||||
:active-sort="activeSort"
|
:active-sort="activeSort"
|
||||||
:active-ordering="activeOrdering"
|
:active-ordering="activeOrdering"
|
||||||
:is-fetching-list="isFetchingList"
|
:is-fetching-list="isFetchingList"
|
||||||
|
:show-pagination-footer="!!companies.length"
|
||||||
@update:current-page="onPageChange"
|
@update:current-page="onPageChange"
|
||||||
@update:sort="handleSort"
|
@update:sort="handleSort"
|
||||||
@search="onSearch"
|
@search="onSearch"
|
||||||
|
|||||||
Reference in New Issue
Block a user