From 1f8c601795d542374af3026b0361cb0100daa44f Mon Sep 17 00:00:00 2001 From: Richard Palethorpe Date: Tue, 1 Apr 2025 08:42:38 +0100 Subject: [PATCH] fix(ui): Format item type label when it contians underscore --- webui/react-ui/src/components/ConfigForm.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/webui/react-ui/src/components/ConfigForm.jsx b/webui/react-ui/src/components/ConfigForm.jsx index 392fe11..3ea5401 100644 --- a/webui/react-ui/src/components/ConfigForm.jsx +++ b/webui/react-ui/src/components/ConfigForm.jsx @@ -76,11 +76,12 @@ const ConfigForm = ({ // Find the field group that matches this item's type const fieldGroup = fieldGroups.find(group => group.name === itemTypeName); + const itemTypeLabel = itemType.charAt(0).toUpperCase() + itemType.slice(1).replace('_', ' '); return (
-

{itemType.charAt(0).toUpperCase() + itemType.slice(1)} #{index + 1}

+

{itemTypeLabel} #{index + 1}