Skip to content

Commit 7028e96

Browse files
committed
fix(drag-reorder): use paddingBottom to expand target column during cross-column drag
The previous approach expanded max-height on the parent column, but overflow-y: clip on the inner container still clipped translateY-shifted cards. Padding is real layout space that grows the container's content box, keeping shifted cards within bounds.
1 parent 6f303b3 commit 7028e96

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/bases/KanbanView.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1541,8 +1541,12 @@ export class KanbanView extends BasesViewBase {
15411541
: 60;
15421542
const gapStr = getComputedStyle(container).gap;
15431543
const gap = parseFloat(gapStr) || 4;
1544-
container.style.setProperty("--tn-drag-gap", `${draggedHeight + gap}px`);
1544+
const totalGap = draggedHeight + gap;
1545+
container.style.setProperty("--tn-drag-gap", `${totalGap}px`);
15451546
container.style.overflowY = "clip";
1547+
// Add padding to grow the container's content box so
1548+
// translateY-shifted cards aren't clipped off the bottom
1549+
container.style.paddingBottom = `${totalGap}px`;
15461550

15471551
const siblings = container.querySelectorAll<HTMLElement>(".kanban-view__card-wrapper");
15481552
for (const sib of siblings) {
@@ -1803,6 +1807,7 @@ export class KanbanView extends BasesViewBase {
18031807
if (this.dragContainer) {
18041808
this.dragContainer.style.removeProperty("--tn-drag-gap");
18051809
this.dragContainer.style.overflowY = "";
1810+
this.dragContainer.style.paddingBottom = "";
18061811
const wrappers = this.dragContainer.querySelectorAll<HTMLElement>(
18071812
".kanban-view__card-wrapper--drag-shift, .kanban-view__card-wrapper--shift-down"
18081813
);

0 commit comments

Comments
 (0)