mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
Fix that pagination on gdd-transactions-list not hides if ther's only one page
This commit is contained in:
parent
737859db89
commit
945e0a3fd9
@ -61,7 +61,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<b-pagination
|
||||
v-if="showPagination"
|
||||
v-if="isPaginationVisible"
|
||||
class="mt-3"
|
||||
pills
|
||||
size="lg"
|
||||
@ -96,11 +96,6 @@ export default {
|
||||
TransactionCreation,
|
||||
TransactionLinkSummary,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
}
|
||||
},
|
||||
props: {
|
||||
transactions: { default: () => [] },
|
||||
pageSize: { type: Number, default: 25 },
|
||||
@ -110,6 +105,11 @@ export default {
|
||||
showPagination: { type: Boolean, default: false },
|
||||
pending: { type: Boolean },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
currentPage: 1,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
updateTransactions() {
|
||||
this.$emit('update-transactions', {
|
||||
@ -123,6 +123,11 @@ export default {
|
||||
return '0'
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
isPaginationVisible() {
|
||||
return this.showPagination && this.pageSize < this.transactions.length
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
currentPage() {
|
||||
this.updateTransactions()
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
:transactionCount="transactionCount"
|
||||
:transactionLinkCount="transactionLinkCount"
|
||||
:transactions="transactions"
|
||||
:show-pagination="true"
|
||||
:showPagination="true"
|
||||
@update-transactions="updateTransactions"
|
||||
v-on="$listeners"
|
||||
/>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user