-
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
fix: can't properly drag and drop in empty record group #9039
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
Implemented drag-and-drop functionality for empty record groups by introducing new components and modifying existing ones to properly handle draggable elements and ref management.
- Added new
packages/twenty-front/src/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx
to encapsulate draggable table row logic - Modified
RecordTableRecordGroupSectionAddNew.tsx
andRecordTableRecordGroupSectionLoadMore.tsx
to support dragging with special index -1 for empty groups - Added
packages/twenty-front/src/utils/mergeRefs.ts
utility to handle multiple React refs for drag-and-drop functionality - Updated
RecordTableActionRow.tsx
to use RecordTableContext instead of Recoil for visible columns management - Refactored
RecordTableRowWrapper.tsx
to delegate draggable functionality to the new RecordTableDraggableTr component
6 file(s) reviewed, 6 comment(s)
Edit PR Review Bot Settings | Greptile
...rc/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx
Show resolved
Hide resolved
...rc/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx
Show resolved
Hide resolved
...-record/record-table/record-table-section/components/RecordTableRecordGroupSectionAddNew.tsx
Outdated
Show resolved
Hide resolved
...src/modules/object-record/record-table/record-table-row/components/RecordTableRowWrapper.tsx
Outdated
Show resolved
Hide resolved
.../src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsx
Show resolved
Hide resolved
...ecord/record-table/record-table-section/components/RecordTableRecordGroupSectionLoadMore.tsx
Outdated
Show resolved
Hide resolved
.../src/modules/object-record/record-table/record-table-row/components/RecordTableActionRow.tsx
Show resolved
Hide resolved
...rc/modules/object-record/record-table/record-table-row/components/RecordTableDraggableTr.tsx
Outdated
Show resolved
Hide resolved
...src/modules/object-record/record-table/record-table-row/components/RecordTableRowWrapper.tsx
Outdated
Show resolved
Hide resolved
33b8b4b
to
444e9e2
Compare
Suspect IssuesThis pull request was deployed and Sentry observed the following issues:
Did you find this useful? React with a 👍 or 👎 |
Fix #8968
Fix issue with drag and drop when record group are empty.
Happy to discuss the implementation, as it's limited to the
@hello-pangea/dnd
api.