ons-lazy-repeat : how to scroll to a desired list item?
peko last edited by peko
I was wondering if there’s any way to scroll the lazy repeat list to the same scrollTop position it was in before calling list.refresh()? The refresh() method scrolls the list back to scrollTop: 0, which I want to avoid.
Since the items are inserted into DOM dynamically, I can’t simply use the .scrollTop property of the item prior to calling list.refresh() - the item won’t exist in DOM after refresh, and it isn’t possible to scroll down that far.
refreshmethod shouldn’t scroll back to the top of the list. Are you able to reproduce that behaviour in the playground? https://onsen.io/playground/
You should be able to set it with the normal JS
scrollproperties but if need be I’ll be post a solution if you can reproduce it