Browse Source

fix: hide all for views types other than grid

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/5060/head
mertmit 2 years ago
parent
commit
15bc281ecb
  1. 18
      packages/nocodb/src/lib/models/View.ts

18
packages/nocodb/src/lib/models/View.ts

@ -1091,14 +1091,16 @@ export default class View implements ViewType {
const table = this.extractViewColumnsTableName(view); const table = this.extractViewColumnsTableName(view);
const scope = this.extractViewColumnsTableNameScope(view); const scope = this.extractViewColumnsTableNameScope(view);
const primary_value_column = await ncMeta.metaGet2(null, null, MetaTable.COLUMNS, { if (view.type === ViewTypes.GRID) {
fk_model_id: view.fk_model_id, const primary_value_column = await ncMeta.metaGet2(null, null, MetaTable.COLUMNS, {
pv: true, fk_model_id: view.fk_model_id,
}) pv: true,
})
// keep primary_value_column always visible
if (primary_value_column) { // keep primary_value_column always visible
ignoreColdIds.push(primary_value_column.id) if (primary_value_column) {
ignoreColdIds.push(primary_value_column.id)
}
} }
// get existing cache // get existing cache

Loading…
Cancel
Save