fix version filtering wrong page (#1206)

This commit is contained in:
kevoh1516
2023-06-20 17:33:34 -04:00
committed by GitHub
parent bd51741b01
commit 14b0e8875d
2 changed files with 3 additions and 1 deletions

View File

@@ -96,6 +96,7 @@ const props = defineProps({
},
},
})
const emit = defineEmits(['switch-page'])
const data = useNuxtApp()
const route = useRoute()
@@ -140,6 +141,7 @@ async function updateQuery() {
s: includeSnapshots.value ? true : undefined,
},
})
emit('switch-page', 1)
}
</script>

View File

@@ -22,7 +22,7 @@
</span>
<DropArea :accept="acceptFileFromProjectType(project.project_type)" @change="handleFiles" />
</div>
<VersionFilterControl :versions="props.versions" />
<VersionFilterControl :versions="props.versions" @switch-page="switchPage" />
<Pagination
:page="currentPage"
:count="Math.ceil(filteredVersions.length / 20)"