Feat/multivalue limit (#14961)
## Summary 1. This change introduces the ability to limit how many values a multi-value field can contain (for example: maximum number of emails, phone numbers, links, or array items). 2. It centralizes the limit as a shared constant and type, validates settings on the server, updates front-end types and components to consume the setting, and adds a small settings UI so workspace admins can change the limit per field. 3. Default behavior is preserved: if no max is configured, the existing default (10) is used. ## **Fixes Issue:** [#14740 ](https://github.com/twentyhq/twenty/issues/14740) ## Manual Test Screenshot <img width="383" height="451" alt="Screenshot 2025-10-08 002413" src="https://github.com/user-attachments/assets/a7704af6-10ef-4d10-b8c9-a9eeca03bfd9" /> ### Values in fields https://github.com/user-attachments/assets/7f59c4f7-3aca-4f83-8c04-3d44988316e3 Let me know if any changes are needed --------- Co-authored-by: Félix Malfait <felix@twenty.com> Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@@ -1,7 +1,10 @@
|
||||
import { type FieldMetadataItemRelation } from '@/object-metadata/types/FieldMetadataItemRelation';
|
||||
import { type FieldDateMetadataSettings } from '@/object-record/record-field/ui/types/FieldMetadata';
|
||||
|
||||
import { type PartialFieldMetadataItemOption } from 'twenty-shared/types';
|
||||
import {
|
||||
type FieldMetadataMultiItemSettings,
|
||||
type PartialFieldMetadataItemOption,
|
||||
} from 'twenty-shared/types';
|
||||
import { type ThemeColor } from 'twenty-ui/theme';
|
||||
import { type Field } from '~/generated-metadata/graphql';
|
||||
|
||||
@@ -18,6 +21,6 @@ export type FieldMetadataItem = Omit<
|
||||
options?: FieldMetadataItemOption[] | null;
|
||||
relation?: FieldMetadataItemRelation | null;
|
||||
morphRelations?: FieldMetadataItemRelation[] | null;
|
||||
settings?: FieldDateMetadataSettings;
|
||||
settings?: FieldDateMetadataSettings | FieldMetadataMultiItemSettings | null;
|
||||
isLabelSyncedWithName?: boolean | null;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user