diff --git a/packages/nc-gui-v2/components/cell/attachment/index.vue b/packages/nc-gui-v2/components/cell/attachment/index.vue index d1a385c2c9..3390e9dc57 100644 --- a/packages/nc-gui-v2/components/cell/attachment/index.vue +++ b/packages/nc-gui-v2/components/cell/attachment/index.vue @@ -6,21 +6,17 @@ import { useSortable } from './sort' import Carousel from './Carousel.vue' import { onMounted, ref, useDropZone, watch } from '#imports' import { isImage, openLink } from '~/utils' -import MaterialSymbolsAttachFile from '~icons/material-symbols/attach-file' -import MaterialArrowExpandIcon from '~icons/mdi/arrow-expand' -import MaterialSymbolsFileCopyOutline from '~icons/material-symbols/file-copy-outline' -import MdiReload from '~icons/mdi/reload' -import IcOutlineInsertDriveFile from '~icons/ic/outline-insert-drive-file' interface Props { modelValue: string | Record[] | null + rowIndex: number } interface Emits { (event: 'update:modelValue', value: string | Record): void } -const { modelValue } = defineProps() +const { modelValue, rowIndex } = defineProps() const emits = defineEmits() @@ -60,7 +56,7 @@ onKeyDown('Escape', () => { /** if possible, on mounted we try to fetch the relevant `td` cell to use as a dropzone */ onMounted(() => { if (typeof document !== 'undefined') { - dropZoneRef.value = document.querySelector(`td[data-col="${column.value.id}"]`) as HTMLTableDataCellElement + dropZoneRef.value = document.querySelector(`td[data-key="${rowIndex}${column.value.id}"]`) as HTMLTableDataCellElement } }) @@ -73,7 +69,7 @@ onMounted(() => { Drop here @@ -100,12 +96,15 @@ onMounted(() => { @@ -152,6 +148,10 @@ onMounted(() => {