Expose per-page size picker for grids

This commit is contained in:
Lance Edgar 2019-05-21 17:37:39 -05:00
parent 9a48a60d28
commit 47b2c603ef

View file

@ -160,7 +160,21 @@
% if grid.pageable and grid.pager: % if grid.pageable and grid.pager:
<template slot="footer"> <template slot="footer">
<div class="has-text-right">showing {{ firstItem }} - {{ lastItem }} of {{ total }} results</div> <b-field grouped position="is-right">
<span class="control">
showing {{ firstItem }} - {{ lastItem }} of {{ total }} results,
</span>
<b-select v-model="perPage"
size="is-small"
@input="loadAsyncData()">
% for value in grid.get_pagesize_options():
<option value="${value}">${value}</option>
% endfor
</b-select>
<span class="control">
per page
</span>
</b-field>
</template> </template>
% endif % endif