Commit 5aad4b0e authored by Konrad Mohrfeldt's avatar Konrad Mohrfeldt

add information on next and previous pages to paginator slots

This comes in handy if we want to hide elements based on the
availability of a prev/next page.
parent 247229ac
<div class="paginator" :class="`is-${behavior}`" v-if="!isEmpty || !hideEmpty">
<slot name="header" :items="items" :count="count" :isLoading="isLoading"/>
<slot name="header" :items="items" :count="count" :isLoading="isLoading" :hasNext="hasNext" :hasPrev="hasPrev"/>
<div class="paginator-items" ref="items" v-bind="$attrs"
:style="isLoading && currentItemsHeight ? { height: `${currentItemsHeight}px` } : null">
<slot :items="items" :count="count" :isLoading="isLoading"></slot>
<slot :items="items" :count="count" :isLoading="isLoading" :hasNext="hasNext" :hasPrev="hasPrev"></slot>
<app-spinner-area v-if="!noLoader && isLoading"/>
<slot name="empty-items" v-if="emptyMessage">
<div class="paginator-not-found" v-if="isEmpty && !isLoading">
......@@ -13,7 +13,7 @@
<slot name="footer" :items="items" :count="count" :isLoading="isLoading"/>
<slot name="footer" :items="items" :count="count" :isLoading="isLoading" :hasNext="hasNext" :hasPrev="hasPrev"/>
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