From c91a8c6abf36885db4bda9454702a123d8867e35 Mon Sep 17 00:00:00 2001 From: Thomas Trompette Date: Fri, 11 Oct 2024 17:11:11 +0200 Subject: [PATCH] Check if relation before trying to input relation label (#7605) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug introduced by https://github.com/twentyhq/twenty/pull/7363 Input value was not set during edition for field that were not relations Fixed Capture d’écran 2024-10-11 à 16 53 56 --- .../forms/components/SettingsDataModelFieldIconLabelForm.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx index c3b82ccddd8c..3e6b3213614e 100644 --- a/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx +++ b/packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldIconLabelForm.tsx @@ -58,7 +58,7 @@ export const SettingsDataModelFieldIconLabelForm = ({ const [iconEditedManually, setIconEditedManually] = useState(false); useEffect(() => { - if (labelEditedManually) return; + if (labelEditedManually || !relationType) return; const label = [ RelationDefinitionType.ManyToOne, RelationDefinitionType.ManyToMany,