Browse Source

fix(nc-gui): dropzone injection not working

pull/3669/head
braks 2 years ago committed by Raju Udava
parent
commit
e4a7497554
  1. 2
      packages/nc-gui/components/cell/attachment/Carousel.vue
  2. 5
      packages/nc-gui/components/cell/attachment/index.vue

2
packages/nc-gui/components/cell/attachment/Carousel.vue

@ -55,7 +55,7 @@ onClickOutside(carouselRef, () => {
</div>
<div
class="select-none group hover:ring active:ring-accent ring-opactiy-100 cursor-pointer leading-8 inline-block px-3 py-1 bg-gray-300 text-white mb-4 text-center rounded shadow"
class="select-none group hover:(ring-1 ring-accent) ring-opacity-100 cursor-pointer leading-8 inline-block px-3 py-1 bg-gray-300 text-white mb-4 text-center rounded shadow"
@click.stop="downloadFile(selectedImage)"
>
<h3 class="group-hover:text-primary">{{ selectedImage && selectedImage.title }}</h3>

5
packages/nc-gui/components/cell/attachment/index.vue

@ -37,7 +37,7 @@ const attachmentCellRef = ref<HTMLDivElement>()
const sortableRef = ref<HTMLDivElement>()
const currentCellRef = dropZoneInjection && dropZoneInjection.value ? ref() : dropZoneInjection
const currentCellRef = ref<Element | undefined>(dropZoneInjection.value)
const { cellRefs, isSharedForm } = useSmartsheetStoreOrThrow()!
@ -60,6 +60,7 @@ const {
watch(
[() => rowIndex, isForm, attachmentCellRef],
() => {
console.log(dropZoneInjection.value, currentCellRef.value)
if (dropZoneInjection?.value) return
if (!rowIndex && (isForm.value || isGallery.value)) {
@ -87,7 +88,7 @@ const { dragging } = useSortable(sortableRef, visibleItems, updateModelValue, is
const { state: rowState } = useSmartsheetRowStoreOrThrow()
const { isOverDropZone } = useDropZone(currentCellRef, onDrop)
const { isOverDropZone } = useDropZone(currentCellRef as any, onDrop)
/** on new value, reparse our stored attachments */
watch(

Loading…
Cancel
Save