feat: add scrollbar and fix selection on scroll

This commit is contained in:
Brooklyn Nicholson 2026-04-14 14:34:33 -05:00
parent 9804aa7443
commit 52c11d172a
10 changed files with 397 additions and 126 deletions

View file

@ -46,6 +46,7 @@ export function useVirtualHistory(
if (!s) {
return NaN
}
const b = Math.floor(s.getScrollTop() / QUANTUM)
return s.isSticky() ? -b - 1 : b
@ -122,6 +123,7 @@ export function useVirtualHistory(
if (!k) {
continue
}
const h = Math.ceil(nodes.current.get(k)?.yogaNode?.getComputedHeight?.() ?? 0)
if (h > 0 && heights.current.get(k) !== h) {