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(
|
const rowVerticalInversionIndex = derived(
|
||||||
[visualRowCapacity, rowHeight],
|
[visualRowCapacity, rowHeight],
|
||||||
([$visualRowCapacity, $rowHeight]) => {
|
([$visualRowCapacity, $rowHeight]) => {
|
||||||
return (
|
const maxCellRenderRows = Math.ceil(MaxCellRenderHeight / $rowHeight)
|
||||||
$visualRowCapacity - Math.ceil(MaxCellRenderHeight / $rowHeight) - 2
|
const topIdx = $visualRowCapacity - maxCellRenderRows - 2
|
||||||
)
|
const bottomIdx = maxCellRenderRows + 1
|
||||||
|
return Math.max(topIdx, bottomIdx)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue