PolymerLabs / uni-virtualizer

Monorepo for a "universal" (renderer-agnostic) virtual scroller and renderer-specific variants

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cannot scroll up

tpluscode opened this issue · comments

I found this annoying behaviour when trying to scroll up a lit-virutalizer. It appears to loop the rangechange event on two topmost items, preventing scroll

This is a long list of dynamic lit@2 elements. New data is being loaded dynamically and array.spliced into the array

Not sure if I will be able to minimally reproduce this yet. Check out the recording below. Going down, the rangechange is fired with increasing indexes. Going up, you see it gets stuck between N and N-1.

ezgif.com-resize.mp4

Thanks for the report. I think I will need to be able to repro this (ideally with a minimal case, otherwise by being able to interact with and debug the full app) in order to diagnose and fix.

Thank you @graynorton. I won't have the bandwidth immediately available to try a minimal repro.

Here is the repo: https://github.com/zazuko/zack-search if you would have the chance to check the full app. The virtualiser is in zack-results component and data being loaded by ResultsController

@tpluscode I tried taking a look today and was able to repro your issue locally using your project. I confirmed that it no longer reproduces when I use the latest (as yet unreleased) version of @lit-labs/virtualizer I have locally. This new version contains a bunch of fixes; I have a guess which one is relevant to your issue, but haven't yet confirmed. I'd like to get a new release out soon in any case, as I've also fixed most to all of the other reported issues, but timing is a bit up in the air. Do you have any particular deadlines you're working toward?

Great news, thank you!

I do not have a particular deadline TBH but I would appreciate a new version some time this month. WDYT?

just to show interest - I would like to add that upgrading to the new lit lib from older lit-element used on approx 50 components - the main obstacle is that we can’t figure out how to migrate the older lit-virtualizer … I would hope soon to be able to use an upgraded virtualizer … initially it did not work with the current available on lit-labs

@graynorton good news about the new version not having this (and perhaps other already mentioned in other reports) bug(s)!
Any ETA on the new version; with the release of 2.0.0 I'd like to migrate to that as soon as possible but only virtualizer is holding me back right now.

Looks like 0.7.0-pre.2 fixed this issue for me.