Ensure grid autoscroll for selected cell visibility accounts for button column width
This commit is contained in:
parent
9c446fee6b
commit
1a83b746b5
|
@ -109,6 +109,7 @@ export const initialise = context => {
|
||||||
maxScrollTop,
|
maxScrollTop,
|
||||||
scrollLeft,
|
scrollLeft,
|
||||||
maxScrollLeft,
|
maxScrollLeft,
|
||||||
|
buttonColumnWidth,
|
||||||
} = context
|
} = context
|
||||||
|
|
||||||
// Ensure scroll state never goes invalid, which can happen when changing
|
// Ensure scroll state never goes invalid, which can happen when changing
|
||||||
|
@ -194,8 +195,10 @@ export const initialise = context => {
|
||||||
|
|
||||||
// Ensure column is not cutoff on right edge
|
// Ensure column is not cutoff on right edge
|
||||||
else {
|
else {
|
||||||
|
const $buttonColumnWidth = get(buttonColumnWidth)
|
||||||
const rightEdge = column.left + column.width
|
const rightEdge = column.left + column.width
|
||||||
const rightBound = $bounds.width + $scroll.left - FocusedCellMinOffset
|
const rightBound =
|
||||||
|
$bounds.width + $scroll.left - FocusedCellMinOffset - $buttonColumnWidth
|
||||||
delta = rightEdge - rightBound
|
delta = rightEdge - rightBound
|
||||||
if (delta > 0) {
|
if (delta > 0) {
|
||||||
scroll.update(state => ({
|
scroll.update(state => ({
|
||||||
|
|
Loading…
Reference in New Issue