From 07d538f6fc573d32588c041e4e3fc77c8d1b75ef Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 2 Jul 2024 14:02:49 +0200 Subject: [PATCH] Don't trim fields on view enrich schema --- packages/server/src/sdk/app/views/index.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/packages/server/src/sdk/app/views/index.ts b/packages/server/src/sdk/app/views/index.ts index b6ac7b6f6b..fce57a390d 100644 --- a/packages/server/src/sdk/app/views/index.ts +++ b/packages/server/src/sdk/app/views/index.ts @@ -160,14 +160,10 @@ export function enrichSchema( for (const key of Object.keys(schema)) { // if nothing specified in view, then it is not visible const ui = view.schema?.[key] || { visible: false } - if (ui.visible === false) { - schema[key].visible = false - } else { - schema[key] = { - ...schema[key], - ...ui, - order: anyViewOrder ? ui?.order ?? undefined : schema[key].order, - } + schema[key] = { + ...schema[key], + ...ui, + order: anyViewOrder ? ui?.order ?? undefined : schema[key].order, } }