Browse Source

feat: skip showing if gallery/kanban have less than 3 visible non-system columns

pull/8381/head
Pranav C 7 months ago
parent
commit
303fc38f69
  1. 3
      packages/nocodb/src/models/View.ts

3
packages/nocodb/src/models/View.ts

@ -549,6 +549,7 @@ export default class View implements ViewType {
{ fk_model_id: param.fk_model_id }, { fk_model_id: param.fk_model_id },
ncMeta, ncMeta,
); );
// keep a map of column id to column object for easy access
const colIdMap = new Map(tableColumns.map((c) => [c.id, c])); const colIdMap = new Map(tableColumns.map((c) => [c.id, c]));
for (const view of views) { for (const view of views) {
@ -562,7 +563,7 @@ export default class View implements ViewType {
} else if (view.uuid) { } else if (view.uuid) {
// if view is shared, then keep the show state as it is // if view is shared, then keep the show state as it is
} }
// if gallery/kanban view, show only 3 columns // if gallery/kanban view, show only 3 columns(excluding system columns)
else if (view.type === ViewTypes.GALLERY) { else if (view.type === ViewTypes.GALLERY) {
const visibleColumnsCount = ( const visibleColumnsCount = (
await GalleryViewColumn.list(view.id, ncMeta) await GalleryViewColumn.list(view.id, ncMeta)

Loading…
Cancel
Save