Improve grid logic around vertically inverting row popovers
This commit is contained in:
parent
6a42d76c62
commit
73cae6198f
|
@ -110,9 +110,10 @@ export const deriveStores = context => {
|
|||
const rowVerticalInversionIndex = derived(
|
||||
[visualRowCapacity, rowHeight],
|
||||
([$visualRowCapacity, $rowHeight]) => {
|
||||
return (
|
||||
$visualRowCapacity - Math.ceil(MaxCellRenderHeight / $rowHeight) - 2
|
||||
)
|
||||
const maxCellRenderRows = Math.ceil(MaxCellRenderHeight / $rowHeight)
|
||||
const topIdx = $visualRowCapacity - maxCellRenderRows - 2
|
||||
const bottomIdx = maxCellRenderRows + 1
|
||||
return Math.max(topIdx, bottomIdx)
|
||||
}
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in New Issue