Commit deed5826 authored by Janis Streib's avatar Janis Streib 🦉
Browse files

ADD: paginator: placeholder for empty input

parent 5aec5b23
Pipeline #152788 passed with stages
in 11 minutes and 51 seconds
...@@ -2,16 +2,20 @@ ...@@ -2,16 +2,20 @@
<div class="paginator"> <div class="paginator">
<FilterInput v-model="filterValue"></FilterInput> <FilterInput v-model="filterValue"></FilterInput>
<b-pagination :total-rows="items.length" v-model="currentPage" :per-page="items_per_page" <b-pagination :total-rows="items.length" v-model="currentPage" :per-page="items_per_page"
v-if="filterValue == '' && items && items.length > items_per_page" align="center"> v-if="filterValue === '' && items && items.length > items_per_page" align="center">
</b-pagination> </b-pagination>
<div class="pagination_container"> <div class="pagination_container">
<slot name="content_skeleton_item" v-if="items == null || items.length == 0"></slot> <slot name="content_skeleton_item" v-if="items == null || items.length === 0"></slot>
<slot name="item" v-else <slot name="item" v-else
v-for="item in slicer" v-for="item in slicer"
v-bind:item="item"/> v-bind:item="item"/>
</div> </div>
<div v-if="items.length === 0"
class="font-italic text-center mt-3">
<span class="font-italic">{{ no_items_text }}</span><br/>
</div>
<b-pagination :total-rows="items.length" v-model="currentPage" :per-page="items_per_page" <b-pagination :total-rows="items.length" v-model="currentPage" :per-page="items_per_page"
v-if="filterValue == '' && items && items.length > items_per_page" align="center"> v-if="filterValue === '' && items && items.length > items_per_page" align="center">
</b-pagination> </b-pagination>
</div> </div>
</template> </template>
...@@ -40,6 +44,11 @@ export default { ...@@ -40,6 +44,11 @@ export default {
return 25 return 25
} }
}, },
no_items_text: {
default() {
return 'Keine Einträge vorhanden'
}
},
filter_function: { filter_function: {
type: Function, type: Function,
default() { default() {
......
Markdown is supported
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