angular-vs-repeat icon indicating copy to clipboard operation
angular-vs-repeat copied to clipboard

Viewport display only one element on page load and display rest of the elements when a scroll is triggered

Open harshpuidev opened this issue 7 years ago • 8 comments
trafficstars

I have used vs-repeat at multiple places and now i see only 1st element out of thousand.

In a viewport, i can display about 15 elements but currently, i see only one and then when I trigger a scroll it displays all elements. I am using angular 1.5.9

harshpuidev avatar Mar 19 '18 17:03 harshpuidev

Can you come up with a minimal example app in a jsfiddle?

Kamil Pękala

Wiadomość napisana przez harshpuidev [email protected] w dniu 19.03.2018, o godz. 18:41:

I have used vs-repeat at multiple places and now i see only 1st element out of thousand.

In a viewport, i can display about 15 elements but currently, i see only one and then when I trigger a scroll it displays all elements. I am using angular 1.5.9

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

kamilkp avatar Mar 19 '18 19:03 kamilkp

I'm experiencing the same bug. For me, the issue arises when the list I'm repeating over changes but I'm unable to re-create the exact issue in jsFiddle. I am however able to recreate the same outcome by triggering a resize: https://jsfiddle.net/L5t4wdfk/

mikemahony avatar Jun 22 '18 21:06 mikemahony

Same bug for me, when creating a big table with many binds and with scroll bound to 'window' on initial render I get only first row. The plugin is working properly after scrolling down a bit though. As an additional note I can say that vs-repeat is in tbody element

Senderek avatar Jun 29 '18 09:06 Senderek

Has anyone managed to find a workaround for this? This appears to be a regression. We upgraded from v1.1.7 to v2.0.9 and have the same issue.

squidsoup avatar Aug 19 '18 22:08 squidsoup

I got the same problem and solve it by the options. image

Ulyssesyi avatar Aug 24 '18 02:08 Ulyssesyi

I've also stumbled upon this issue and manually setting the size as @Ulyssesyi suggested has worked as a workaround. I would still like to see the root cause solved since I would prefer not to set a fixed size on the elements since size can vary anytime through CSS and forgetting to update the size in the vs-repeat directive would mean breaking the list scrolling (and it's easy to forget that).

alejandroiglesias avatar Nov 21 '18 19:11 alejandroiglesias

I don't know about a workaround, but this seems to fix. https://github.com/kamilkp/angular-vs-repeat/pull/224

hugoj-goncalves avatar Mar 15 '19 18:03 hugoj-goncalves

@hugoj-goncalves Thanks a lot. facing the same problem..

Hope that commit will be merged soon !!!!!

thao33 avatar Oct 26 '20 11:10 thao33