feat: Enable customization in Gallery view

Signed-off-by: Pranav C <pranavxc@gmail.com>
This commit is contained in:
Pranav C
2021-08-23 13:21:58 +05:30
parent 5f92e4eab7
commit 166142d351
7 changed files with 188 additions and 22 deletions

View File

@@ -75,10 +75,10 @@ export default {
methods: {
async createView() {
let showFields = null
let attachmentCol
if (this.show_as === 'gallery') {
showFields = { [this.primaryValueColumn]: true }
const attachmentCol = this.meta.columns.find(c => c.uidt === 'Attachment')
attachmentCol = this.meta.columns.find(c => c.uidt === 'Attachment')
if (attachmentCol) {
showFields[attachmentCol.cn] = true
}
@@ -97,6 +97,7 @@ export default {
title: this.view_name,
query_params: {
showFields,
coverImageField: attachmentCol ? attachmentCol._cn : '',
...this.queryParams
},
parent_model_title: this.table,