Skip to content
Snippets Groups Projects
Commit 408277c9 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Fix item counts in WorkerVersion paginator

parent 880a1bd6
No related branches found
No related tags found
1 merge request!1285Fix item counts in WorkerVersion paginator
......@@ -6,6 +6,7 @@
:loading="loading"
v-slot="{ results }"
:page.sync="page"
:page-size="pageSize"
singular="version"
plural="versions"
>
......@@ -70,6 +71,12 @@ export default {
loading: false,
page: 1
}),
computed: {
pageSize () {
// Use a small page size when not in workflow creation mode because members are displayed on the same column
return this.processId ? 20 : 5
}
},
methods: {
...mapMutations('notifications', ['notify']),
...mapActions('process', ['listVersions']),
......@@ -80,10 +87,9 @@ export default {
const payload = {
workerId: this.workerId,
page: this.page,
page_size: this.pageSize,
mode: this.advancedMode ? 'complete' : 'simple'
}
// Use a small page size when not in workflow creation mode because members are displayed on the same column
if (!this.processId) payload.page_size = 5
try {
this.versionsPage = await this.listVersions(payload)
} catch (err) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment