fix: resize handle now adjusts column to its left
Handle on the left edge resizes the PREVIOUS column, not itself. This matches the mental model: dragging the boundary between Subject and Status changes Subject's width. First column has no handle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -890,16 +890,19 @@ function TicketWorkbenchContent() {
|
|||||||
density === "compact" ? "min-h-7" : "min-h-8"
|
density === "compact" ? "min-h-7" : "min-h-8"
|
||||||
)} style={{ display: "table-row" }}>
|
)} style={{ display: "table-row" }}>
|
||||||
<div style={{ display: "table-cell", width: 36 }} />
|
<div style={{ display: "table-cell", width: 36 }} />
|
||||||
{availableColumns.filter((c) => c.visible).map((col) => (
|
{availableColumns.filter((c) => c.visible).map((col, idx, arr) => (
|
||||||
<div
|
<div
|
||||||
key={col.key}
|
key={col.key}
|
||||||
className="relative border-r border-border/60 px-3 align-middle last:border-r-0"
|
className="relative border-r border-border/60 px-3 align-middle last:border-r-0"
|
||||||
style={{ display: "table-cell", width: col.key === "subject" ? undefined : col.width }}
|
style={{ display: "table-cell", width: col.key === "subject" ? undefined : col.width }}
|
||||||
>
|
>
|
||||||
|
{/* Resize handle: drags the boundary, resizes the column to the LEFT */}
|
||||||
|
{idx > 0 && (
|
||||||
<div
|
<div
|
||||||
className="absolute left-0 top-0 h-full w-2 -ml-1 cursor-col-resize hover:bg-primary/40 z-10"
|
className="absolute left-0 top-0 h-full w-2 -ml-1 cursor-col-resize hover:bg-primary/40 z-10"
|
||||||
onMouseDown={(e) => handleColumnResize(col.key, e)}
|
onMouseDown={(e) => handleColumnResize(arr[idx - 1].key, e)}
|
||||||
/>
|
/>
|
||||||
|
)}
|
||||||
<span className="text-[10px] font-semibold uppercase text-muted-foreground/60 truncate block">
|
<span className="text-[10px] font-semibold uppercase text-muted-foreground/60 truncate block">
|
||||||
{col.label}
|
{col.label}
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
Reference in New Issue
Block a user