-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
fix: Array data type accepts whitespace as input #7707
Conversation
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 PR addresses the issue of whitespace and null inputs being accepted as valid in the MultiItemFieldInput component for array data types.
- Introduced
turnIntoEmptyStringIfWhitespacesOnly
utility function inpackages/twenty-front/src/modules/object-record/record-field/meta-types/input/components/MultiItemFieldInput.tsx
- Applied the new utility function to the input value in the
onChange
handler to prevent whitespace-only inputs - This change aligns the behavior of array data type inputs with other UI elements, rejecting whitespace and null values
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
Hello @harshit078, thank you for contributing. It still accepts empty string values, is this intended? |
Yes @bosiraphael, RecordInineCell container still accepts null values and white space as valid input. I'm currently working on it and will push an issue regarding the same. This PR was a fix to reducing the GraphQL request made and RightDrawer saving the State when input entered. |
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.
LGTM
Thanks @harshit078 for your contribution! |
Congratulations @harshit078! |
Description