diff --git a/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte b/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte index 20cfdb1ec5..9718ddf65f 100644 --- a/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte +++ b/packages/frontend-core/src/components/grid/layout/ButtonColumn.svelte @@ -12,7 +12,7 @@ rows, focusedRow, selectedRows, - visibleColumns, + scrollableColumns, scroll, isDragging, buttonColumnWidth, @@ -22,12 +22,13 @@ let container $: buttons = $props.buttons?.slice(0, 3) || [] - $: columnsWidth = $visibleColumns.reduce( + $: columnsWidth = $scrollableColumns.reduce( (total, col) => (total += col.width), 0 ) - $: end = columnsWidth - 1 - $scroll.left - $: left = Math.min($width - $buttonColumnWidth, end) + $: columnEnd = columnsWidth - $scroll.left - 1 + $: gridEnd = $width - $buttonColumnWidth + $: left = Math.min(columnEnd, gridEnd) const handleClick = async (button, row) => { await button.onClick?.(rows.actions.cleanRow(row)) @@ -49,6 +50,7 @@ class="button-column" style="left:{left}px" class:hidden={$buttonColumnWidth === 0} + class:right-border={left !== gridEnd} >