Commit 9e71412c authored by gj4210's avatar gj4210 👁 Committed by janis.streib
Browse files

ADD: Block attribute to Paginator & PaginatorList

(fills width)
parent fc7d73a0
<template>
<b-row class="justify-content-md-center">
<b-col cols="6" md="auto" v-if="total_rows > per_page">
<b-col cols="6" md="auto" v-if="total_rows > per_page" class="m-0">
<b-pagination :total-rows="total_rows" v-model="current_page_mutable" :per-page="per_page" first-number
last-number class="shadow">
</b-pagination>
</b-col>
<b-col cols="6" md="auto">
<b-col cols="6" md="auto" class="m-0" :class="{'ml-auto': block}">
<b-input-group class="shadow">
<b-form-select v-model="per_page_mutable" :options="per_page_options"/>
<template #append>
......@@ -48,6 +48,12 @@ export default {
{ value: 0, text: 'Alle' }
]
}
},
block: {
type: Boolean,
default() {
return false
}
}
},
computed: {
......
......@@ -2,7 +2,7 @@
<div class="paginator">
<FilterInput v-model="filterValue"></FilterInput>
<Paginator :current_page="current_page" :per_page="items_per_page" @current-page="current_page = $event"
@per-page="items_per_page = $event" :total_rows="filtered_and_sorted_items.length"
@per-page="items_per_page = $event" :total_rows="filtered_and_sorted_items.length" :block="block"
v-if="filtered_and_sorted_items.length > 0"/>
<div class="pagination_container">
......@@ -17,7 +17,7 @@
</div>
<Paginator :current_page="current_page" :per_page="items_per_page" @current-page="current_page = $event"
@per-page="items_per_page = $event" :total_rows="filtered_and_sorted_items.length"
@per-page="items_per_page = $event" :total_rows="filtered_and_sorted_items.length" :block="block"
v-if="filtered_and_sorted_items.length > 0"/>
</div>
</template>
......@@ -59,6 +59,12 @@ export default {
]
}
},
block: {
type: Boolean,
default() {
return false
}
},
no_items_text: {
default() {
return 'Keine Einträge vorhanden'
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment