Comments (1)
I was able to hack around this error by providing my own scrollToFn
and fixing scrollOffset
before calling the actual implementation:
scrollToFn(offset, options, instance) {
if (instance.scrollElement) {
instance.scrollOffset = Math.min(instance.scrollElement.scrollHeight - instance.scrollElement.clientHeight, instance.scrollOffset);
}
elementScroll(offset, options, instance);
},
Not sure whether you think it should be the core behavior, but for me it fixed the issue.
NOTE: This fix works as is for vertical scroll, for horizontal scroll you'll need to use clientWidth
and scrollWidth
instead.
from virtual.
Related Issues (20)
- VirtualItem measurements are incorrect when getEstimateSize returns a string HOT 1
- Virtualizer.scrollToIndex - Uncaught error when list is empty HOT 7
- useWindowVirtualizer with measureElement, hidden list, and auto-loading items causes getVirtualItems length to go to infinity HOT 1
- virtualizer.getVirtualItems() return zero items for vanilla js project HOT 7
- Tanstack virtual docs search is broken
- Scroll to not working + warning about flushSync HOT 2
- useVirtualizer not working in Vue Test Utils HOT 2
- flushSync was called from inside a lifecycle method HOT 5
- Infinite loop in Vue adapter when estimated size doesn't match dynamic size HOT 4
- Infinite scroll and virtualization lag HOT 1
- Not working using separated wrapper component HOT 3
- React Compiler: useVirtual results are cached at their initial values HOT 3
- React 19 issue with useWindowVirtualizer HOT 2
- HMR (live reload, fast refresh) broke render in React HOT 2
- Dependency Dashboard
- @tanstack/lit-virtual is missing a README HOT 1
- Prop 'gap' doesn't work with the dynamic implementation HOT 1
- items missing from elementsCache when using getItemKey to set a unique memoizable key HOT 15
- Reactivity issues when using with Solid Start
- Module parse failed
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from virtual.