Akryum / vue-virtual-scroller

⚡️ Blazing fast scrolling for any amount of data
https://vue-virtual-scroller-demo.netlify.app
9.36k stars 896 forks source link

fix(RecycleScroller): gridItems is undefined when scrollToItem, fix #773 #761

Closed crs38c28 closed 1 year ago

crs38c28 commented 1 year ago

Description

Fix RecycleScroller scrollToItem method when itemSize is not null.  
Scroll position is wrong because gridItems is undefined.

Reproduction Demo site

1. unchecked 'variable height'
2. click 'Scroll To:' button
3. list scroll to 'item 0' (not 'item 100')
netlify[bot] commented 1 year ago

Deploy Preview for vue-virtual-scroller-demo ready!

Name Link
Latest commit aefa0099d0043667c183ac94a2423aea93bc271b
Latest deploy log https://app.netlify.com/sites/vue-virtual-scroller-demo/deploys/63579a94fbe9e4000841b88b
Deploy Preview https://deploy-preview-761--vue-virtual-scroller-demo.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

mjclyde commented 1 year ago

I just noticed this issue, made the same fix for it, then noticed your PR. 👍🏻 Nice catch.