diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-11-28 10:05:07 +0100 |
---|---|---|
committer | nextcloud-command <nextcloud-command@users.noreply.github.com> | 2023-11-29 15:55:20 +0000 |
commit | 00bb1bc86eff73e74b7dfc0490f1b37caa1a9f34 (patch) | |
tree | 53af4eacbc1710780d41d94d0108230c89d7d580 /core/src/components | |
parent | b213fc7c74e938358b2257e87ee5754b0d71ad4a (diff) | |
download | nextcloud-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.vue | 7 |
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> |