Skip to content

Commit

Permalink
Merge pull request #4923 from nextcloud-libraries/respect-target-attr…
Browse files Browse the repository at this point in the history
…ibute-nclistitem

Add target prop for NcListItem
  • Loading branch information
Fenn-CS committed Dec 6, 2023
2 parents c899f87 + abeeef2 commit b344e19
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/components/NcListItem/NcListItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
<a :id="anchorId"
ref="list-item"
:href="routerLinkHref || href"
:target="href === '#' ? undefined : '_blank'"
:target="target || (href === '#' ? undefined : '_blank')"
:rel="href === '#' ? undefined : 'noopener noreferrer'"
class="list-item"
:aria-label="linkAriaLabel"
Expand Down Expand Up @@ -470,6 +470,11 @@ export default {
default: '#',
},
target: {
type: String,
default: '',
},
/**
* Id for the `<a>` element
*/
Expand Down Expand Up @@ -585,7 +590,6 @@ export default {
computedActionsAriaLabel() {
return this.actionsAriaLabel || t('Actions for item with name "{name}"', { name: this.name })
},
},
watch: {
Expand Down

0 comments on commit b344e19

Please sign in to comment.