Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229600

virtualScroll scrollTo generates TypeError: Cannot read property 'scrollTop' of null

$
0
0

Hi all,
New to Ionic here, just love it. SuperSample is fantastic… but I’m a bit lost and don’t know where to turn to at this point.

When using scrollTo on a virtualScroll content to jump far ahead in a large list, the list goes blank and the following error is generated

vScrollSegmentRangePage.html:25 ERROR TypeError: Cannot read property 'scrollTop' of null
    at VirtualScroll.scrollUpdate (virtual-scroll.ts:714)
    at SafeSubscriber.schedulerFn [as _next] (event_emitter.ts:121)
    at SafeSubscriber.__tryOrUnsub (Subscriber.ts:254)
...
    at EventEmitterProxy.EventEmitter.emit (event_emitter.ts:80)
    at ScrollView.scroll.onScroll (content.ts:441)
    at ScrollView.setScrolling (scroll-view.ts:74)

scrollTo is called from a function bound to a vertical slider/range.
Sample code can be found at https://stackblitz.com/edit/ionic-list100k-segment-index
The current list has 10k items. Scolling from the navigator page is fine as it scrolls gradually.
But when I use the slider to go to the middle of the list for example, I get the above error, the list goes blank and never recovers.

Am I doing something wrong ?
Am I missing some parameters ?
Is this a bug ?

Tx for any input.
Martin


Viewing all articles
Browse latest Browse all 229600

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>