diff --git a/packages/frontend-core/src/components/grid/cells/GutterCell.svelte b/packages/frontend-core/src/components/grid/cells/GutterCell.svelte
index 218341e54e..d7d197758d 100644
--- a/packages/frontend-core/src/components/grid/cells/GutterCell.svelte
+++ b/packages/frontend-core/src/components/grid/cells/GutterCell.svelte
@@ -6,12 +6,13 @@
import { createEventDispatcher } from "svelte"
export let row
- export let rowFocused
- export let rowHovered
- export let rowSelected
+ export let rowFocused = false
+ export let rowHovered = false
+ export let rowSelected = false
export let disableExpand = false
export let disableNumber = false
export let defaultHeight = false
+ export let disabled = false
const { config, dispatch, selectedRows } = getContext("grid")
const svelteDispatch = createEventDispatcher()
@@ -57,7 +58,7 @@
class:visible={$config.allowDeleteRows &&
(disableNumber || rowSelected || rowHovered || rowFocused)}
>
-
+
{#if !disableNumber}
col.width === smallSize)
- $: allMedium = $columns.every(col => col.width === mediumSize)
- $: allLarge = $columns.every(col => col.width === largeSize)
+ $: allCols = $columns.concat($stickyColumn ? [$stickyColumn] : [])
+ $: allSmall = allCols.every(col => col.width === smallSize)
+ $: allMedium = allCols.every(col => col.width === mediumSize)
+ $: allLarge = allCols.every(col => col.width === largeSize)
$: custom = !allSmall && !allMedium && !allLarge
$: sizeOptions = [
{
@@ -57,6 +58,7 @@
size="M"
on:click={() => (open = !open)}
selected={open}
+ disabled={!allCols.length}
>
Width
diff --git a/packages/frontend-core/src/components/grid/layout/NewRow.svelte b/packages/frontend-core/src/components/grid/layout/NewRow.svelte
index 0729e032ec..54fef78301 100644
--- a/packages/frontend-core/src/components/grid/layout/NewRow.svelte
+++ b/packages/frontend-core/src/components/grid/layout/NewRow.svelte
@@ -87,8 +87,10 @@
...state,
top: $maxScrollTop,
}))
- offset =
- $renderedRows.length * $rowHeight - ($maxScrollTop % $rowHeight) - 1
+ offset = $renderedRows.length * $rowHeight - ($maxScrollTop % $rowHeight)
+ if ($renderedRows.length !== 0) {
+ offset -= 1
+ }
}
// Update state and select initial cell
diff --git a/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte b/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte
index 1a67aaa417..6f10c30695 100644
--- a/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte
+++ b/packages/frontend-core/src/components/grid/layout/StickyColumn.svelte
@@ -12,6 +12,7 @@
rows,
selectedRows,
stickyColumn,
+ renderedColumns,
renderedRows,
focusedCellId,
hoveredRowId,
@@ -51,7 +52,8 @@
disableNumber
on:select={selectAll}
defaultHeight
- rowSelected={selectedRowCount === rowCount}
+ rowSelected={selectedRowCount && selectedRowCount === rowCount}
+ disabled={!$renderedRows.length}
/>
{#if $stickyColumn}
@@ -87,7 +89,7 @@
{/if}
{/each}
- {#if $config.allowAddRows}
+ {#if $config.allowAddRows && ($renderedColumns.length || $stickyColumn)}
($hoveredRowId = BlankRowID)}