Skip to content

Commit

Permalink
Fixing list parameters in export link
Browse files Browse the repository at this point in the history
  • Loading branch information
Harald Wilhelmi committed Sep 11, 2024
1 parent 966a381 commit 3f52f2d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions client/src/components/search/SearchResults.vue
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const records = ref()
const router = useRouter()
const disableExportLink = computed(() => props.disabled || loading.value)
const exportLink = getExportLink()
const exportLink = computed(() => getExportLink())
onMounted(() => loadData())
Expand Down Expand Up @@ -118,7 +118,11 @@ function getExportLink() {
const url = new URL(getApiUrl('modification/csv'))
for (const [k, v] of Object.entries(rawParams)) {
if (v != null) {
url.searchParams.append(k, v)
if (Array.isArray(v)) {
v.forEach((x) => url.searchParams.append(k, x))
} else {
url.searchParams.append(k, v)
}
}
}
return url.toString()
Expand Down

0 comments on commit 3f52f2d

Please sign in to comment.