Browse Source

feat(gallery): skip empty value to be displayed in the gallery view

pull/4242/head
redhoyasa 2 years ago
parent
commit
04a7fbd525
  1. 58
      packages/nc-gui/components/smartsheet/Gallery.vue

58
packages/nc-gui/components/smartsheet/Gallery.vue

@ -203,38 +203,36 @@ watch(view, async (nextView) => {
<MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" /> <MdiFileImageBox v-else class="w-full h-48 my-4 text-cool-gray-200" />
</template> </template>
<div <div v-for="col in fieldsWithoutCover" :key="`record-${record.row.id}-${col.id}`">
v-for="col in fieldsWithoutCover" <div v-if="!isRowEmpty(record, col)" class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full">
:key="`record-${record.row.id}-${col.id}`" <div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
class="flex flex-col space-y-1 px-4 mb-6 bg-gray-50 rounded-lg w-full" <div class="w-full text-gray-600">
> <LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" />
<div class="flex flex-row w-full justify-start border-b-1 border-gray-100 py-2.5">
<div class="w-full text-gray-600"> <LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
<LazySmartsheetHeaderVirtualCell v-if="isVirtualCol(col)" :column="col" :hide-menu="true" /> </div>
<LazySmartsheetHeaderCell v-else :column="col" :hide-menu="true" />
</div> </div>
</div>
<div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start"> <div class="flex flex-row w-full pb-3 pt-2 pl-2 items-center justify-start">
<div v-if="isRowEmpty(record, col)" class="h-3 bg-gray-200 px-5 rounded-lg"></div> <div v-if="isRowEmpty(record, col)" class="h-3 bg-gray-200 px-5 rounded-lg"></div>
<template v-else> <template v-else>
<LazySmartsheetVirtualCell <LazySmartsheetVirtualCell
v-if="isVirtualCol(col)" v-if="isVirtualCol(col)"
v-model="record.row[col.title]" v-model="record.row[col.title]"
:column="col" :column="col"
:row="record" :row="record"
/> />
<LazySmartsheetCell <LazySmartsheetCell
v-else v-else
v-model="record.row[col.title]" v-model="record.row[col.title]"
:column="col" :column="col"
:edit-enabled="false" :edit-enabled="false"
:read-only="true" :read-only="true"
/> />
</template> </template>
</div>
</div> </div>
</div> </div>
</a-card> </a-card>

Loading…
Cancel
Save