Increase horizontal padding when scrolling to a selected cell

This commit is contained in:
Andrew Kingston 2023-04-11 14:19:02 +01:00
parent 1726948f67
commit 6c203a1e66
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
import { writable, derived, get } from "svelte/store"
import { tick } from "svelte"
import { DefaultColumnWidth } from "./columns"
export const createStores = () => {
const scroll = writable({
@ -145,7 +146,7 @@ export const deriveStores = context => {
const $visibleColumns = get(visibleColumns)
const columnName = $focusedCellId?.split("-")[1]
const column = $visibleColumns.find(col => col.name === columnName)
const horizontalOffset = 24
const horizontalOffset = DefaultColumnWidth
if (!column) {
return
}