From 07d0c7fac503705573c568f038ef7e263341580f Mon Sep 17 00:00:00 2001 From: Amir Raminfar Date: Mon, 19 Feb 2024 15:12:16 -0800 Subject: [PATCH] fix: fixes changing items per page. fixes #2784 (#2786) --- assets/components/ContainerTable.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/assets/components/ContainerTable.vue b/assets/components/ContainerTable.vue index a1a480c9..47b08637 100644 --- a/assets/components/ContainerTable.vue +++ b/assets/components/ContainerTable.vue @@ -129,6 +129,7 @@ const sortedContainers = computedWithControl( const totalPages = computed(() => Math.ceil(sortedContainers.value.length / perPage.value)); const isPaginated = computed(() => totalPages.value > 1); const currentPage = ref(1); +watch(perPage, () => (currentPage.value = 1)); const paginated = computed(() => { const start = (currentPage.value - 1) * perPage.value; const end = start + perPage.value;