Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

fix: properly fetch and add dependency field to state

mertmitf54c3af02800
diff --git a/packages/nc-gui/composables/useSharedView.ts b/packages/nc-gui/composables/useSharedView.ts
index 3b95311824..5ca404a046 100644
--- a/packages/nc-gui/composables/useSharedView.ts
+++ b/packages/nc-gui/composables/useSharedView.ts
@@ -116,10 +116,7 @@ export function useSharedView() {
}
if (meta.value) {
- meta.value.columns = [...viewMeta.model.columns]
- .filter((c) => c.show || rangeFields.includes(c.id) || (sharedView.value?.type === ViewTypes.GRID && c?.group_by))
- .map((c) => ({ ...c, order: order++ }))
- .sort((a, b) => a.order - b.order)
+ meta.value.columns = [...viewMeta.model.columns].map((c) => ({ ...c, order: order++ })).sort((a, b) => a.order - b.order)
}
await setMeta(viewMeta.model)
diff --git a/packages/nocodb/src/services/public-metas.service.ts b/packages/nocodb/src/services/public-metas.service.ts
index e9a7621667..df2777f9e3 100644
--- a/packages/nocodb/src/services/public-metas.service.ts
+++ b/packages/nocodb/src/services/public-metas.service.ts
@@ -12,6 +12,7 @@ import type {
CalendarView,
LinkToAnotherRecordColumn,
LookupColumn,
+ RollupColumn,
} from '~/models';
import type { NcContext } from '~/interface/config';
import {
@@ -108,6 +109,13 @@ export class PublicMetasService {
view.columns.some((vc) => vc.fk_column_id === c1.id && vc.show) &&
(<LinkToAnotherRecordColumn>c1.colOptions).fk_child_column_id ===
c.fk_column_id,
+ ) ||
+ view.model.columns.some(
+ (c1) =>
+ (UITypes.Lookup === c1.uidt || UITypes.Rollup === c1.uidt) &&
+ c1.colOptions &&
+ (<LookupColumn | RollupColumn>c1.colOptions)
+ .fk_relation_column_id === c.fk_column_id,
)
);
})