aboutsummaryrefslogtreecommitdiffstats
path: root/core/src/components
diff options
context:
space:
mode:
authorfenn-cs <fenn25.fn@gmail.com>2023-11-28 10:05:07 +0100
committernextcloud-command <nextcloud-command@users.noreply.github.com>2023-11-29 15:55:20 +0000
commit00bb1bc86eff73e74b7dfc0490f1b37caa1a9f34 (patch)
tree53af4eacbc1710780d41d94d0108230c89d7d580 /core/src/components
parentb213fc7c74e938358b2257e87ee5754b0d71ad4a (diff)
downloadnextcloud-server-00bb1bc86eff73e74b7dfc0490f1b37caa1a9f34.tar.gz
nextcloud-server-00bb1bc86eff73e74b7dfc0490f1b37caa1a9f34.zip
Migrate openResult method to SearchResult component
After moving the `SearchResult` to its own component and leaving out the openResult method, the search results do not lead anywhere but but error out. Signed-off-by: fenn-cs <fenn25.fn@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core/src/components')
-rw-r--r--core/src/components/GlobalSearch/SearchResult.vue7
1 files changed, 6 insertions, 1 deletions
diff --git a/core/src/components/GlobalSearch/SearchResult.vue b/core/src/components/GlobalSearch/SearchResult.vue
index 7647ca298ed..a35395922d1 100644
--- a/core/src/components/GlobalSearch/SearchResult.vue
+++ b/core/src/components/GlobalSearch/SearchResult.vue
@@ -2,7 +2,7 @@
<NcListItem class="result-items__item"
:name="title"
:bold="false"
- @click="openResult(result)">
+ @click="openResult(resourceUrl)">
<template #icon>
<div aria-hidden="true"
class="result-items__item-icon"
@@ -91,6 +91,11 @@ export default {
thumbnailErrorHandler() {
this.thumbnailHasError = true
},
+ openResult(url) {
+ if (url) {
+ window.location = url
+ }
+ },
},
}
</script>