From 39b95c17105e1015caece9ef03ec8d25618814f3 Mon Sep 17 00:00:00 2001 From: rijkvanzanten Date: Fri, 15 Oct 2021 18:30:22 -0400 Subject: [PATCH] Fix default fields on layout switch --- app/src/layouts/tabular/index.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/src/layouts/tabular/index.ts b/app/src/layouts/tabular/index.ts index 79bf9678ee..1d584a37fb 100644 --- a/app/src/layouts/tabular/index.ts +++ b/app/src/layouts/tabular/index.ts @@ -146,9 +146,7 @@ export default defineLayout({ primaryKeyField.value ? [primaryKeyField.value?.field] : [] ); - const fields = syncRefProperty( - layoutQuery, - 'fields', + const fields = syncRefProperty(layoutQuery, 'fields', () => fieldsInCollection.value .filter((field: Field) => !field.meta?.hidden) .slice(0, 4)