Comments (6)
Got it, thanks for the repro steps!
from react-virtuoso.
You are correct in your statement - the list assumes the "default" value from the first item rendered (it has to take it from somewhere, and maybe a "defaultItemHeight" property would help).
However, there is a self-repairing mechanism that will append additional items if the assumption is wrong. I took your example and it seems to work fine here, but perhaps I am missing something.
Can you please elaborate on how I can reproduce the incorrect behavior.
from react-virtuoso.
To reproduce the error I got you have to scroll fast down to the smaller items and then abruptly stop. That sometimes leads to an empty viewport. It is a bit easier to do with a larger list size: https://stackblitz.com/edit/react-compvw-bkco4s
Once you are in that state the list does not seem to use the recovery mechanism you spoke of anymore.
from react-virtuoso.
Confirming that this is a bug, I found a solution but need to test it for possible performance regression. If everything is good, I will release a fix over the weekend.
from react-virtuoso.
@petyosi Thanks for the quick response!
from react-virtuoso.
Published 0.12.4 and updated the example with it. You can see how the shorter items are re-filled with new ones.
A property that can improve the behavior in this case is defaultItemHeight
- something which I consider.
from react-virtuoso.
Related Issues (20)
- [BUG] `restoreStateFrom` appears to have a race condition when restoring state on component mount HOT 8
- React Virtuoso Message List - ref.current.scrollToItem based on the item.data instead of using the item index?
- [BUG] npm run browse-examples HOT 1
- [BUG] Simple header breaks restore state location HOT 3
- [BUG] When used in MUI's Tooltip component, extra white space will appear. HOT 1
- Chrome52 is not compatible HOT 1
- [BUG] Grid jittering/flickering HOT 1
- [BUG] VirtuosoGrid - endReached doesn't call if data set is less then the container HOT 1
- Drag the scrolllbar makes the grid blink in Firefox, but not in Chromium or Edge... HOT 1
- [BUG] react-beautiful-dnd + useWindowScroll HOT 1
- [BUG] followOutput doesn't scroll to bottom HOT 2
- [BUG] element disappearing when reverse scrolling in the ios HOT 4
- [BUG]After packaging a project that uses react-virtuoso, there is a problem embedding it into the iframe of another domain name HOT 2
- [BUG] `InitialTopMostItemIndex` causes variable height elements to blink/jump when scrolling up. HOT 1
- [BUG] Border does not get respected with fixed headers HOT 3
- Drag and drop not working as intended on mobile devices when using react-beautiful-dnd with react-virtuoso HOT 2
- [BUG] followOutput does not scroll al the way to bottom HOT 3
- [BUG] (virtuoso-message-list) strange scrolling on ipad HOT 2
- [BUG] Inability to use a flex container as a parent or to customize viewport
- [BUG] ScrollSeekPlaceholder in grouping mode create sticky placeholder item on the top of list HOT 2
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 react-virtuoso.