Skip to content

fix: keep sortable table rows from collapsing while dragging - #282

Merged
hellopablo merged 1 commit into
developfrom
feature/sortable-table-rows
Oct 5, 2026
Merged

hellopablo merged 1 commit into
developfrom
feature/sortable-table-rows

Conversation

@hellopablo

Copy link
Copy Markdown
Member

Summary

  • Keep a dragged admin table row from collapsing the table: the placeholder cells hold the row's height, and the drag preview is a table so the clone keeps its column widths.
  • Leave list sortables on the existing helper. Only a tbody.js-admin-sortable gets the table-row behaviour.

Test plan

  • On a table with two or more tall rows, drag a row and confirm the gap stays the height of the row, stays visible, and moves with the pointer.
  • Confirm the other rows do not jump or resize, and the clone keeps the column widths.
  • Drop the row and confirm .js-admin-sortable__order is rewritten in the new order.
  • Drag a non-table sortable elsewhere in admin and confirm it still behaves as before.

A dragged table row was leaving a one-line hole because row height is ignored on the placeholder, and the preview collapsed once the clone left the table.
@hellopablo
hellopablo marked this pull request as ready for review October 5, 2026 19:07
@hellopablo
hellopablo enabled auto-merge October 5, 2026 19:07
@hellopablo
hellopablo merged commit 8437485 into develop Oct 5, 2026
5 checks passed
@hellopablo
hellopablo deleted the feature/sortable-table-rows branch October 5, 2026 19:08
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.

1 participant