Skip to content

Commit de1601b

Browse files
committed
Correct semantics for link opening in global search
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 : nextcloud-libraries/nextcloud-vue#4923 Resolves : #41800 Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
1 parent e1ecf79 commit de1601b

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

core/src/components/GlobalSearch/SearchResult.vue

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<NcListItem class="result-items__item"
33
:name="title"
44
:bold="false"
5-
@click="openResult(resourceUrl)">
5+
:href="resourceUrl"
6+
:target="'_self'">
67
<template #icon>
78
<div aria-hidden="true"
89
class="result-items__item-icon"
@@ -91,11 +92,6 @@ export default {
9192
thumbnailErrorHandler() {
9293
this.thumbnailHasError = true
9394
},
94-
openResult(url) {
95-
if (url) {
96-
window.location = url
97-
}
98-
},
9995
},
10096
}
10197
</script>

0 commit comments

Comments
 (0)