Comments (6)
Hi @inokawa , I've tested with virtua v0.9.1 and it totally fine 🤣, so this issue only happen with v0.12.0, it seem strange
my code for virtua part is pretty simple, you can see it here: https://github.com/luminous-devs/lume/blob/feat/v2/src/shared/widgets/local/network.tsx
I will setup more reproduction when I have time, I will stick with v0.9.1 for now
from virtua.
Hi @inokawa , I've tested with v0.13.0 and it work really well
from virtua.
Hello, thank you for your interest in my lib!
I think that is not related to #65 .
Any reproduction code would help me investigating it more, but what I can guess now is:
- Resizing (of image or something else) at the outside of the top of VList may cause layout shift in certain situations. Currently this lib fixes jumps when scrolling up but not when not scrolling. It might be better to change that behavior.
- You have to set true to
shifting
prop when you add items to the start of the list, otherwise layout shift may happen. - Using virtua after 0.11.0 may decrease shifts because I changed visible range detection algorithm, if you have not upgraded it yet.
from virtua.
Thank you for the additional information.
As I mentioned, I changed range detection algorithm in 0.11.0 and now items at the opposite side of scroll direction will be unmounted while scrolling, which is similar to react-window.
I suspect this behavior causes the problem.
from virtua.
I've a suggestion, instead of unmount the item, we can replace them with blank div match exact item's height
from virtua.
@reyamir
I've released 0.13.0
which has better jump compensation logic for outside of viewport. Could you try it?
I'm not sure it resolves your issue but it will have less layout shifts I think.
from virtua.
Related Issues (20)
- Bug: Can't reverse scroll without mounting initial off-screen items HOT 1
- Jump when partially offscreen item animates to height of zero for removal HOT 3
- Support Web Components HOT 1
- Cannot find module 'virtua/solid' HOT 4
- Solidjs VList reactivity not working HOT 3
- Get access to core module HOT 1
- Add item prop to Vue Virtualizer
- Reverse scroll with dynamic height stops before actual top end HOT 3
- Add containerProps and itemProps to Virtualizer HOT 1
- defineComponent is not defined error in Nuxt HOT 4
- `NaN` is an invalid value for the `top` css style property. HOT 3
- Inject `scrollRef` to obtain the width of the scrollbar
- offset bug HOT 1
- Unexpected jumpy behavior occurs when scrolling, suddenly jumping up to page 1. HOT 2
- Rewrite Svelte adapter with Svelte v5 syntax
- Generate API docs for Svelte with typedoc
- Scroll to bottom doesn't work correctly in inactive tab HOT 4
- Add Svelte WindowVirtualizer
- Support Scroll Snap
- Feature request: Table Render for Vue 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 virtua.