Skip to content

Use renderRow to implement row dragging - #3965

Merged
amanmahajan7 merged 4 commits into
mainfrom
am-row-dragging
Feb 20, 2026
Merged

amanmahajan7 merged 4 commits into
mainfrom
am-row-dragging

Conversation

@amanmahajan7

@amanmahajan7 amanmahajan7 commented Feb 20, 2026 •

Copy link
Copy Markdown
Collaborator

fixes #2916

@amanmahajan7 amanmahajan7 self-assigned this Feb 20, 2026
Comment on lines -37 to -38
// TODO: use a custom drag image to show a preview of the row being dragged
event.dataTransfer.setDragImage(event.currentTarget.parentElement!.firstElementChild!, 40, 17);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default image is not the best but at least it shows the full row. I am sure there is a way to improve it

@amanmahajan7
amanmahajan7 marked this pull request as ready for review February 20, 2026 18:07
nstepien
nstepien previously approved these changes Feb 20, 2026

const rowDraggingClassname = css`
opacity: 0.5;
`;

const rowOverClassname = css`
.rdg-row:has(&) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cells have background-color: inherit; so I don't think we ever needed this selector 🤔

Comment thread website/routes/RowsReordering.tsx Resolved
@amanmahajan7
amanmahajan7 enabled auto-merge (squash) February 20, 2026 18:27
@amanmahajan7
amanmahajan7 merged commit 48597e7 into main Feb 20, 2026
1 check passed
@amanmahajan7
amanmahajan7 deleted the am-row-dragging branch February 20, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support dragging entire rows

2 participants