Skip to content

Commit

Permalink
Fix tippy not showing after tile in ResourceTiles has been deleted (d…
Browse files Browse the repository at this point in the history
…ynamic index problem)
  • Loading branch information
pascalwengerter committed Feb 8, 2023
1 parent 668b397 commit 45b3e28
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
<oc-list class="oc-tiles oc-flex" :class="resizable ? 'resizableTiles' : ''">
<li v-for="(resource, index) in data" :key="resource.id" class="oc-tiles-item">
<oc-tile
:ref="
(el) => {
tileRefs.tiles[index] = el
}
"
:ref="(el) => (tileRefs.tiles[resource.id] = el)"
:resource="resource"
:resource-route="getRoute(resource)"
@vue:mounted="$emit('rowMounted', resource, tileRefs.tiles[index], ImageDimension.Tile)"
@contextmenu="showContextMenu($event, index, tileRefs.tiles[index])"
@vue:mounted="
$emit('rowMounted', resource, tileRefs.tiles[resource.id], ImageDimension.Tile)
"
@contextmenu="showContextMenu($event, resource.id, tileRefs.tiles[resource.id])"
@click="emitTileClick(resource)"
>
<template #imageField>
Expand All @@ -26,20 +24,20 @@
:id="`space-context-btn-${resource.getDomSelector()}`"
:ref="
(el) => {
tileRefs.dropBtns[index] = el
tileRefs.dropBtns[resource.id] = el
}
"
v-oc-tooltip="contextMenuLabel"
:aria-label="contextMenuLabel"
appearance="raw"
@click="resetDropPosition($event, index, tileRefs.dropBtns[index])"
@click="resetDropPosition($event, resource.id, tileRefs.dropBtns[resource.id])"
>
<oc-icon name="more-2" />
</oc-button>
<oc-drop
:ref="
(el) => {
tileRefs.dropEls[index] = el
tileRefs.dropEls[resource.id] = el
}
"
:drop-id="`space-context-drop-${resource.getDomSelector()}`"
Expand Down

0 comments on commit 45b3e28

Please sign in to comment.