Check if relation before trying to input relation label (#7605)
Bug introduced by https://github.com/twentyhq/twenty/pull/7363 Input value was not set during edition for field that were not relations Fixed <img width="893" alt="Capture d’écran 2024-10-11 à 16 53 56" src="https://github.com/user-attachments/assets/511077c6-5dff-49a1-b058-24a83d998dcf">
This commit is contained in:
@ -58,7 +58,7 @@ export const SettingsDataModelFieldIconLabelForm = ({
|
|||||||
const [iconEditedManually, setIconEditedManually] = useState(false);
|
const [iconEditedManually, setIconEditedManually] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (labelEditedManually) return;
|
if (labelEditedManually || !relationType) return;
|
||||||
const label = [
|
const label = [
|
||||||
RelationDefinitionType.ManyToOne,
|
RelationDefinitionType.ManyToOne,
|
||||||
RelationDefinitionType.ManyToMany,
|
RelationDefinitionType.ManyToMany,
|
||||||
|
|||||||
Reference in New Issue
Block a user