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 984624e
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions packages/web-app-files/src/components/FilesList/ResourceTiles.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
<template>
<div>
<oc-list class="oc-tiles oc-flex" :class="resizable ? 'resizableTiles' : ''">
<li v-for="(resource, index) in data" :key="resource.id" class="oc-tiles-item">
<li v-for="resource 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 984624e

Please sign in to comment.