Revert "fix: prevent default object re-selection in relation field fo… (#17619)
I suggest to revert [this PR](https://github.com/twentyhq/twenty/pull/17313) as it had already been fixed [in this PR](https://github.com/twentyhq/twenty/pull/17209/changes) (which fixes more than it says in its title). Issue was tracked by [this ticket](https://github.com/twentyhq/core-team-issues/issues/2049) not very explicit - sorry, my fault. Code added in the PR does not add value
This commit is contained in:
+4
-9
@@ -17,7 +17,6 @@ import { SettingsTextInput } from '@/ui/input/components/SettingsTextInput';
|
||||
import { useIsMobile } from '@/ui/utilities/responsive/hooks/useIsMobile';
|
||||
import styled from '@emotion/styled';
|
||||
import { useLingui } from '@lingui/react/macro';
|
||||
import { useMemo } from 'react';
|
||||
import { isDefined } from 'twenty-shared/utils';
|
||||
import { RelationType } from '~/generated-metadata/graphql';
|
||||
|
||||
@@ -115,14 +114,10 @@ export const SettingsDataModelFieldRelationForm = ({
|
||||
relationType: initialRelationType,
|
||||
});
|
||||
|
||||
const initialMorphRelationsObjectMetadataIds = useMemo(
|
||||
() =>
|
||||
initialRelationObjectMetadataItems.map(
|
||||
(relationObjectMetadataItem) => relationObjectMetadataItem.id,
|
||||
),
|
||||
[initialRelationObjectMetadataItems],
|
||||
);
|
||||
|
||||
const initialMorphRelationsObjectMetadataIds =
|
||||
initialRelationObjectMetadataItems.map(
|
||||
(relationObjectMetadataItem) => relationObjectMetadataItem.id,
|
||||
);
|
||||
const isMobile = useIsMobile();
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user