Update button column to account for ability to add rows
This commit is contained in:
parent
c5e27b860f
commit
2d52eff96f
|
@ -20,6 +20,7 @@
|
||||||
showVScrollbar,
|
showVScrollbar,
|
||||||
showHScrollbar,
|
showHScrollbar,
|
||||||
dispatch,
|
dispatch,
|
||||||
|
config,
|
||||||
} = getContext("grid")
|
} = getContext("grid")
|
||||||
|
|
||||||
let container
|
let container
|
||||||
|
@ -103,17 +104,21 @@
|
||||||
</GridCell>
|
</GridCell>
|
||||||
</div>
|
</div>
|
||||||
{/each}
|
{/each}
|
||||||
<div
|
{#if $config.canAddRows}
|
||||||
class="row blank"
|
<div
|
||||||
on:mouseenter={$isDragging ? null : () => ($hoveredRowId = BlankRowID)}
|
class="row blank"
|
||||||
on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)}
|
on:mouseenter={$isDragging
|
||||||
>
|
? null
|
||||||
<GridCell
|
: () => ($hoveredRowId = BlankRowID)}
|
||||||
width={$buttonColumnWidth}
|
on:mouseleave={$isDragging ? null : () => ($hoveredRowId = null)}
|
||||||
highlighted={$hoveredRowId === BlankRowID}
|
>
|
||||||
on:click={() => dispatch("add-row-inline")}
|
<GridCell
|
||||||
/>
|
width={$buttonColumnWidth}
|
||||||
</div>
|
highlighted={$hoveredRowId === BlankRowID}
|
||||||
|
on:click={() => dispatch("add-row-inline")}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{/if}
|
||||||
</GridScrollWrapper>
|
</GridScrollWrapper>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue