Increase horizontal padding when scrolling to a selected cell
This commit is contained in:
parent
1726948f67
commit
6c203a1e66
|
@ -1,5 +1,6 @@
|
||||||
import { writable, derived, get } from "svelte/store"
|
import { writable, derived, get } from "svelte/store"
|
||||||
import { tick } from "svelte"
|
import { tick } from "svelte"
|
||||||
|
import { DefaultColumnWidth } from "./columns"
|
||||||
|
|
||||||
export const createStores = () => {
|
export const createStores = () => {
|
||||||
const scroll = writable({
|
const scroll = writable({
|
||||||
|
@ -145,7 +146,7 @@ export const deriveStores = context => {
|
||||||
const $visibleColumns = get(visibleColumns)
|
const $visibleColumns = get(visibleColumns)
|
||||||
const columnName = $focusedCellId?.split("-")[1]
|
const columnName = $focusedCellId?.split("-")[1]
|
||||||
const column = $visibleColumns.find(col => col.name === columnName)
|
const column = $visibleColumns.find(col => col.name === columnName)
|
||||||
const horizontalOffset = 24
|
const horizontalOffset = DefaultColumnWidth
|
||||||
if (!column) {
|
if (!column) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue