This commit is contained in:
Dan Abramov
2024-11-30 13:38:55 +00:00
parent 56cbaf5067
commit 97273be3a6
+1
View File
@@ -88,6 +88,7 @@ export function TabBar({
const offsetPerPage = contentSize.get() - containerSize.get()
const progressDiff = index - dragProgress.get()
const offsetDiff = (progressDiff / (itemsLength - 1)) * offsetPerPage
// TODO: Get into view if obscured
const offset = scrollX.get() + offsetDiff
scrollTo(scrollElRef, offset, 0, true)
}