Comments (5)
Was able to fix this by delaying measurements with nextTick
before measureElement. Looks like vue renders items a bit later, breaking dynamic measurements.
So, my measure function looks like this
const measureElement = (el: any) => {
nextTick(() => {
if (!el) return;
rowVirtualizer.value.measureElement(el);
});
};
from virtual.
Any update on this?
from virtual.
Any update on this?
Are you using Vue or React?
from virtual.
Any update on this?
Are you using Vue or React?
React
from virtual.
I fixed a similar problem by modifying the Virtualizer to not remeasure elements when scrolling up:
measureElement: (element, entry, instance) => {
const direction = instance.scrollDirection
if (direction === "forward" || direction === null) {
return element.scrollHeight
} else {
// don't remeasure if we are scrolling up
const indexKey = Number(element.getAttribute("data-index"))
let cacheMeasurement = instance.itemSizeCache.get(indexKey)
return cacheMeasurement
}
}
from virtual.
Related Issues (20)
- No rows returned by useVirtualizer in unit tests HOT 13
- The page is not started at the top when navigating to a page that uses @tanstack/virtual >= v3.0.0-beta.61
- Scroll offset with dynamic sizes not working properly in React 16 HOT 1
- flushSync warning when using useVritualizer with initialOffset greater than available scroll HOT 1
- Weird order of virtual items for many lanes when items has the same size
- Expanding rows in a virtualized table will cause it to scroll to top HOT 2
- Scrolling up with dynamic heights stutters and jumps HOT 14
- solid-virtual: UI not updating when ```count``` changes in ```createVirtualizer``` parameters HOT 3
- no measeure element height for useWindowVirtualizer() HOT 2
- Total size is calculated incorrectly for masonry grids HOT 1
- virtualizer.getVirtualItems() mismatches with number provided in count attribute during initialisation
- Docs: Embedded StackBlitz playground cannot find example code HOT 1
- react-virtual v3.0.* is using strict version of virtual-core 3.0.0 HOT 1
- Uncaught Error: Maximum update depth exceeded. When we add styles for first row.
- svelte-virtual: no release created since 3.0.4 HOT 2
- useVirtualizer is not a function error after upgrading to 3.1.2
- Tanstack Virtual freezes when using React DevTools
- useVirtualiser is undefined - build issue HOT 1
- Rendering lag when using virtualised for both rows and columns along with Tanstack/table HOT 2
- Stackblitz not supporting Firefox renders the examples section useless for Firefox users. HOT 1
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.