Skip to content

Commit 3f52f2d

Browse files
author
Harald Wilhelmi
committed
Fixing list parameters in export link
1 parent 966a381 commit 3f52f2d

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Diff for: client/src/components/search/SearchResults.vue

+6-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const records = ref()
4444
4545
const router = useRouter()
4646
const disableExportLink = computed(() => props.disabled || loading.value)
47-
const exportLink = getExportLink()
47+
const exportLink = computed(() => getExportLink())
4848
4949
onMounted(() => loadData())
5050
@@ -118,7 +118,11 @@ function getExportLink() {
118118
const url = new URL(getApiUrl('modification/csv'))
119119
for (const [k, v] of Object.entries(rawParams)) {
120120
if (v != null) {
121-
url.searchParams.append(k, v)
121+
if (Array.isArray(v)) {
122+
v.forEach((x) => url.searchParams.append(k, x))
123+
} else {
124+
url.searchParams.append(k, v)
125+
}
122126
}
123127
}
124128
return url.toString()

0 commit comments

Comments
 (0)