Skip to content
Snippets Groups Projects
Commit 70ce1119 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'fix-versions-page-size' into 'master'

Fix item counts in WorkerVersion paginator

Closes #998

See merge request !1285
parents 880a1bd6 408277c9
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