From 7524260bed6d7395bd5f841fff1e6bf42589c8f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C5=BEe=20Fortun?= Date: Thu, 23 Mar 2023 11:17:43 +0100 Subject: [PATCH] Respect module field order in non configured record blocks --- client/web/compose/src/components/PageBlocks/RecordBase.vue | 2 +- client/web/compose/src/components/PageBlocks/RecordEditor.vue | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/client/web/compose/src/components/PageBlocks/RecordBase.vue b/client/web/compose/src/components/PageBlocks/RecordBase.vue index e1a98d44d..ad560c695 100644 --- a/client/web/compose/src/components/PageBlocks/RecordBase.vue +++ b/client/web/compose/src/components/PageBlocks/RecordBase.vue @@ -92,7 +92,7 @@ export default { if (!this.options.fields || this.options.fields.length === 0) { // No fields defined in the options, show all (buy system) - return this.module.fields.slice().sort((a, b) => a.label.localeCompare(b.label)) + return this.module.fields } // Show filtered & ordered list of fields diff --git a/client/web/compose/src/components/PageBlocks/RecordEditor.vue b/client/web/compose/src/components/PageBlocks/RecordEditor.vue index e3ed8efd5..73bc14b80 100644 --- a/client/web/compose/src/components/PageBlocks/RecordEditor.vue +++ b/client/web/compose/src/components/PageBlocks/RecordEditor.vue @@ -118,8 +118,8 @@ export default { } if (!this.options.fields || this.options.fields.length === 0) { - // No fields defined in the options, show all (buy system) - return this.module.fields.slice().sort((a, b) => a.label.localeCompare(b.label)) + // No fields defined in the options, show all (but system) + return this.module.fields } // Show filtered & ordered list of fields