Browse Source

Merge pull request #3545 from nocodb/fix/3541-shared-view-download-option

fix: show attachment cell data in shared grid view
pull/3546/head
Raju Udava 2 years ago committed by GitHub
parent
commit
7233957942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      packages/nc-gui/components/cell/attachment/utils.ts

5
packages/nc-gui/components/cell/attachment/utils.ts

@ -18,6 +18,7 @@ import {
useProject,
watch,
} from '#imports'
import { IsFormInj } from '~/context'
import MdiPdfBox from '~icons/mdi/pdf-box'
import MdiFileWordOutline from '~icons/mdi/file-word-outline'
import MdiFilePowerpointBox from '~icons/mdi/file-powerpoint-box'
@ -37,6 +38,8 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
const isPublic = inject(IsPublicInj, ref(false))
const isForm = inject(IsFormInj, ref(false))
const meta = inject(MetaInj)!
const column = inject(ColumnInj)!
@ -162,7 +165,7 @@ export const [useProvideAttachmentCell, useAttachmentCell] = useInjectionState(
}
/** our currently visible items, either the locally stored or the ones from db, depending on isPublicForm status */
const visibleItems = computed<any[]>(() => (isPublic.value ? storedFiles.value : attachments.value))
const visibleItems = computed<any[]>(() => (isPublic.value && isForm.value ? storedFiles.value : attachments.value))
watch(files, (nextFiles) => nextFiles && onFileSelect(nextFiles))

Loading…
Cancel
Save