Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -200,11 +200,14 @@ export default defineComponent({
},

methods: {
emitClick() {
emitClick(e: MouseEvent) {
if (!e || typeof e.stopPropagation !== 'function') {
return
}
/**
* Triggered when the resource is a file and the name is clicked
*/
this.$emit('click')
this.$emit('click', e)
}
}
})
Expand Down
6 changes: 3 additions & 3 deletions packages/web-pkg/src/components/FilesList/ResourceTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
:link="resourceRoute"
:is-resource-clickable="isResourceClickable"
tabindex="-1"
@click="$emit('click')"
@click="$emit('click', $event)"
>
<div
class="oc-tile-card-selection z-10 absolute top-0 left-0 [&_input]:bg-role-surface-container"
Expand Down Expand Up @@ -81,7 +81,7 @@
:is-extension-displayed="isExtensionDisplayed"
:is-resource-clickable="isResourceClickable"
:link="resourceRoute"
@click.stop="$emit('click')"
@click.stop="$emit('click', $event)"
/>
</div>
<div class="flex items-center">
Expand Down Expand Up @@ -137,7 +137,7 @@ const {
}>()

const emit = defineEmits<{
(e: 'click'): void
(e: 'click', event: MouseEvent | KeyboardEvent): void
(e: 'contextmenu', event: MouseEvent | KeyboardEvent): void
(e: 'itemVisible'): void
}>()
Expand Down