Make pagination configurable in configuration (#533)

* Make pagination configurable in configuration

* Set pagination defaults in store

* Add documentation of pagination
This commit is contained in:
Robert-Jan de Dreu
2025-02-25 09:00:34 +01:00
committed by GitHub
parent 08ee98ed8b
commit ff0c247992
6 changed files with 17 additions and 15 deletions

View File

@@ -191,7 +191,7 @@ export default {
data() {
return {
dropZone: false,
perPage: '',
perPage: this.$store.state.config.pagination[0],
currentPage: 1,
checked: [],
isLoading: false,

View File

@@ -65,7 +65,7 @@ export default {
components: { Menu, Pagination },
data() {
return {
perPage: '',
perPage: this.$store.state.config.pagination[0],
currentPage: 1,
isLoading: false,
defaultSort: ['name', 'desc'],

View File

@@ -1,17 +1,12 @@
<template>
<div>
<b-select :value="perpage" size="is-small" @input="$emit('selected', $event)">
<option value="">
{{ lang('No pagination') }}
</option>
<option value="5">
{{ lang('Per page', 5) }}
</option>
<option value="10">
{{ lang('Per page', 10) }}
</option>
<option value="15">
{{ lang('Per page', 15) }}
<option
v-for="page in this.$store.state.config.pagination"
:key="page"
:value="page"
>
{{ page === '' ? lang('No pagination') : lang('Per page', page) }}
</option>
</b-select>
</div>