Skip to content

Commit

Permalink
Correct semantics for link opening in global search
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fenn-CS committed Dec 6, 2023
1 parent e1ecf79 commit aa25590
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions core/src/components/GlobalSearch/SearchResult.vue
Expand Up @@ -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"
Expand Down Expand Up @@ -91,11 +92,6 @@ export default {
thumbnailErrorHandler() {
this.thumbnailHasError = true
},
openResult(url) {
if (url) {
window.location = url
}
},
},
}
</script>
Expand Down

0 comments on commit aa25590

Please sign in to comment.