-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Allow defining option key also in custom select options #7019
Conversation
Welcome!
Hello there, congrats on your first PR! We're excited to have you contributing to this project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This pull request introduces significant changes to allow custom select options to have different values and labels in the Twenty application. Here's a concise summary of the key modifications:
- Modified
selectOptionsSchema
to remove strict validation between 'value' and 'label' fields - Updated
SettingsDataModelFieldSelectFormOptionRow
component to include separate input fields for option value and label - Adjusted UI layout and styling for better alignment and usability in the select option row
- Enhanced dropdown menu functionality for additional actions on select options
- Maintained backward compatibility by auto-generating values from labels when editing, while allowing manual customization
These changes provide more flexibility in defining select options, enabling users to create custom key-value pairs for select fields in the data model settings.
2 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings
} | ||
RightIcon={isDefault ? IconCheck : undefined} | ||
maxLength={OPTION_VALUE_MAXIMUM_LENGTH} | ||
onInputEnter={() => {}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: onInputEnter is not being used here. Consider removing or implementing the functionality
Hello @sid0-0, thank you for contributing to twenty! |
@bosiraphael no worries. I raised a PR because this issue was not assigned to anyone or tagged to be picked by anyone. |
Closing in favor of #7489, Thank you for your contribution on our other issues ! |
Closes #6146
Screenshots:
Single select:
Multi select:
Notes: Current behaviour is such that editing label will also edit value to fit according to the label (as per the old method) to continue suggested values without enforcing them.