Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jun 27, 2024. It is now read-only.

Commit 751fb32

Browse files
Merge pull request #17 from protonemedia/hide-pagination-container
Hide pagination container when no pagination is available
2 parents f0382c2 + c30a6ab commit 751fb32

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

‎js/Components/Pagination.vue‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ const Pagination = {
1212
return Pagination.defaultTranslations;
1313
},
1414
15+
hasPagination() {
16+
return Object.keys(this.pagination).length > 0;
17+
},
18+
1519
pagination() {
1620
if ("total" in this.meta && "to" in this.meta && "from" in this.meta) {
1721
return this.meta;

‎js/Tailwind2/Pagination.vue‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<nav
33
class="bg-white px-4 py-3 flex items-center justify-between border-t border-gray-200 sm:px-6"
4-
v-if="meta"
4+
v-if="hasPagination"
55
>
66
<p v-if="pagination.total < 1">{{ translations.no_results_found }}</p>
77
<div v-if="pagination.total > 0" class="flex-1 flex justify-between sm:hidden">

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /