Skip to content

Commit cb3588e

Browse files
fix(spa): Layout modal locked rows get a drag-handle placeholder for alignment (#607)
Patch — UX polish, no API change.
1 parent 2d38e5e commit cb3588e

2 files changed

Lines changed: 15 additions & 1 deletion

File tree

frontend/apps/web/src/ColumnLayoutModal.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,20 @@ function LockedRow({
272272
className="flex items-center gap-2 rounded border border-transparent bg-gray-50 px-1 py-1"
273273
aria-label={`${label} (locked)`}
274274
>
275+
{/* Non-interactive drag-handle placeholder so the locked row's
276+
checkbox + label align with the sortable rows below
277+
(which have a real handle button at the start). Matches the
278+
handle button's exact box: `p-0.5` padding + `h-4 w-4` icon
279+
= a 20×20 px slot. Rendered faded (text-gray-300) to signal
280+
"this column would be draggable if it weren't locked"
281+
without inviting clicks. aria-hidden so screen readers
282+
skip it. */}
283+
<span
284+
aria-hidden
285+
className="inline-flex h-5 w-5 shrink-0 cursor-not-allowed items-center justify-center p-0.5 text-gray-300"
286+
>
287+
<GripVertical className="h-4 w-4" aria-hidden />
288+
</span>
275289
{onUnlock ? (
276290
<button
277291
type="button"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-admin-react"
3-
version = "1.4.2"
3+
version = "1.4.3"
44
description = "A drop-in React single-page admin for Django, driven entirely by ModelAdmin."
55
authors = ["django-admin-react contributors"]
66
license = "MIT"

0 commit comments

Comments
 (0)