From 15bc281ecb17886c9cd1b6a5805e37b908a82358 Mon Sep 17 00:00:00 2001 From: mertmit Date: Wed, 8 Feb 2023 22:22:25 +0300 Subject: [PATCH] fix: hide all for views types other than grid Signed-off-by: mertmit --- packages/nocodb/src/lib/models/View.ts | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/packages/nocodb/src/lib/models/View.ts b/packages/nocodb/src/lib/models/View.ts index a270fd5450..e802384252 100644 --- a/packages/nocodb/src/lib/models/View.ts +++ b/packages/nocodb/src/lib/models/View.ts @@ -1091,14 +1091,16 @@ export default class View implements ViewType { const table = this.extractViewColumnsTableName(view); const scope = this.extractViewColumnsTableNameScope(view); - const primary_value_column = await ncMeta.metaGet2(null, null, MetaTable.COLUMNS, { - fk_model_id: view.fk_model_id, - pv: true, - }) - - // keep primary_value_column always visible - if (primary_value_column) { - ignoreColdIds.push(primary_value_column.id) + if (view.type === ViewTypes.GRID) { + const primary_value_column = await ncMeta.metaGet2(null, null, MetaTable.COLUMNS, { + fk_model_id: view.fk_model_id, + pv: true, + }) + + // keep primary_value_column always visible + if (primary_value_column) { + ignoreColdIds.push(primary_value_column.id) + } } // get existing cache