-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Fixed record pickers create new #12705
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
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
Major refactoring of relation picker components to fix multiple bugs related to record creation and improve code maintainability.
- Split
RecordDetailRelationSectionDropdown
into two specialized components (ToOne
andToMany
) eliminating nested ternaries and improving code clarity - Fixed search filter persistence in
useSingleRecordPickerSearch.ts
preventing incorrect 'No record' selection during search - Added proper state management in
RelationToOneFieldInput.tsx
for updating selected records after creation - Implemented refetch queries in
useAddNewRecordAndOpenRightDrawer.ts
to ensure command menu updates after record creation - Enhanced empty state handling in
SingleRecordPickerMenuItemsWithSearch.tsx
with proper filteredSelectedRecords checks
9 files reviewed, 2 comments
Edit PR Review Bot Settings | Greptile
...c/modules/object-record/record-field/meta-types/input/components/RelationToOneFieldInput.tsx
Show resolved
Hide resolved
...d/record-show/record-detail-section/components/RecordDetailRelationSectionDropdownToMany.tsx
Show resolved
Hide resolved
🚀 Preview Environment Ready! Your preview environment is available at: http://bore.pub:22443 This environment will automatically shut down when the PR is closed or after 5 hours. |
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
This PR fixes many bugs related to creating a record from inside a relation picker, single or multiple. QA video : Part 1 : https://github.com/user-attachments/assets/35450b08-ff84-4698-8318-681d72437cd4 Part 2 : https://github.com/user-attachments/assets/807c3a7b-4116-41ff-b9a0-23767452b631 Also : - Refactored `RecordDetailRelationSectionDropdown` to split it into two components to avoid too many ternaries inside functions. Fixes twentyhq#12668 Fixes twentyhq#12669 Fixes twentyhq#12670 Fixes twentyhq#12671
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
This PR fixes many bugs related to creating a record from inside a relation picker, single or multiple.
QA video :
Part 1 :
QA.1.mov
Part 2 :
QA.2.mov
Also :
RecordDetailRelationSectionDropdown
to split it into two components to avoid too many ternaries inside functions.Fixes #12668
Fixes #12669
Fixes #12670
Fixes #12671