From 7b40471f3577e22212103ccc2abb957ef2d5717d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Wed, 11 Dec 2024 11:42:31 +0100 Subject: [PATCH] Fix module meta admin fields breaking module in edge cases --- .../src/components/PageBlocks/RecordListBase.vue | 4 ++-- .../PageBlocks/RecordListConfigurator.vue | 2 +- .../src/views/Admin/Modules/Records/List.vue | 4 ++-- lib/js/src/compose/types/module.ts | 14 +++++++++++--- 4 files changed, 16 insertions(+), 8 deletions(-) diff --git a/client/web/compose/src/components/PageBlocks/RecordListBase.vue b/client/web/compose/src/components/PageBlocks/RecordListBase.vue index bdd0ab7ac..32b9ef1d9 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListBase.vue @@ -106,7 +106,7 @@ @@ -1310,7 +1310,7 @@ export default { onUpdateFields (fields = []) { this.options.fields = [...fields] - this.customConfiguredFields = fields.map((f) => f.isSystem ? f.name : f.fieldID) + this.customConfiguredFields = fields.map((f) => f.isSystem ? f.name : f.fieldID).filter(f => !!f) this.setStorageRecordListConfiguredFields() this.$emit('save-fields', this.options.fields) diff --git a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue index e0430ee80..0a13f502a 100644 --- a/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue +++ b/client/web/compose/src/components/PageBlocks/RecordListConfigurator.vue @@ -1065,7 +1065,7 @@ export default { onUpdateTextWrapOption (fields = []) { if (this.options.textStyles.wrappedFields) { - this.options.textStyles.wrappedFields = fields.map(f => f.fieldID) + this.options.textStyles.wrappedFields = fields.map(f => f.fieldID && f.fieldID !== NoID ? f.fieldID : f.name).filter(f => !!f) } }, }, diff --git a/client/web/compose/src/views/Admin/Modules/Records/List.vue b/client/web/compose/src/views/Admin/Modules/Records/List.vue index 1f7cd5852..57d65a18e 100644 --- a/client/web/compose/src/views/Admin/Modules/Records/List.vue +++ b/client/web/compose/src/views/Admin/Modules/Records/List.vue @@ -44,7 +44,7 @@