From 5ae40d8e1560bc933a09fa8a2ff0a28bb5a80f99 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 12 Aug 2022 14:34:02 +0100 Subject: [PATCH] Use friendly name in new component panel if available --- .../[componentId]/new/_components/NewComponentPanel.svelte | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte index a5d77c32ca..b0cd544977 100644 --- a/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte +++ b/packages/builder/src/pages/builder/app/[application]/design/[screenId]/components/[componentId]/new/_components/NewComponentPanel.svelte @@ -58,7 +58,10 @@ enrichedStructure.push({ name: "Custom components", isCategory: true, - children: customComponents.map(x => definitions[x]), + children: customComponents.map(x => ({ + ...definitions[x], + name: definitions[x].friendlyName || definitions[x].name, + })), }) }