]> source.dussan.org Git - nextcloud-server.git/commitdiff
Correct semantics for link opening in global search
authorfenn-cs <fenn25.fn@gmail.com>
Wed, 6 Dec 2023 15:03:27 +0000 (16:03 +0100)
committerfenn-cs <fenn25.fn@gmail.com>
Wed, 6 Dec 2023 15:49:21 +0000 (16:49 +0100)
Following the update of `NcListItem` to allow control over
 where and how passed `hrefs` open, the search result component
 can now make use of these props.

See : https://github.com/nextcloud-libraries/nextcloud-vue/pull/4923

Resolves :  #41800

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
core/src/components/GlobalSearch/SearchResult.vue

index a35395922d19d55cd7bd403c69f91c32f40c97e6..a746a5751b70645c3c87150da6d608459d86b46f 100644 (file)
@@ -2,7 +2,8 @@
        <NcListItem class="result-items__item"
                :name="title"
                :bold="false"
-               @click="openResult(resourceUrl)">
+               :href="resourceUrl"
+               target="_self">
                <template #icon>
                        <div aria-hidden="true"
                                class="result-items__item-icon"
@@ -91,11 +92,6 @@ export default {
                thumbnailErrorHandler() {
                        this.thumbnailHasError = true
                },
-               openResult(url) {
-                       if (url) {
-                               window.location = url
-                       }
-               },
        },
 }
 </script>