material icon indicating copy to clipboard operation
material copied to clipboard

virtualRepeat: with layout-wrap

Open orangesoup opened this issue 11 years ago • 49 comments

I have an <md-content layout="row" layout-wrap> which contains many <md-card> elements with fixed width and height. On the initial page load I load X number of them. This is all fine. What I would like to do is on scroll (infinite scroll) load more card data and display them. Is this possible with virtual-repeat now and if so, how? If not, how could I achieve the same effect without virtual-repeat?

orangesoup avatar Oct 08 '15 15:10 orangesoup

Do you solve this issue or find a workaround ? I'm facing the same issue

eloyleonardo avatar Oct 27 '15 16:10 eloyleonardo

If there a way to expose NUM_EXTRA property can sove the problem using a high number of extra components in the screen (i think it's ugly, but it's a way to solve this problem).

eloyleonardo avatar Oct 27 '15 19:10 eloyleonardo

You should be able to do this with the md-on-demand feature. Have a look at the infinite scroll demo to see how you'd load in the additional data.

kseamon avatar Nov 02 '15 22:11 kseamon

@kseamon I tried something like this, but the problem is, the card is only drawn when it gets near the top, leaving the bottom of the page blank. Maybe i made something wrong, here a codepen with the problem: http://codepen.io/eloyleonardo/pen/epjVBJ

Thanks

eloyleonardo avatar Nov 03 '15 11:11 eloyleonardo

Ah, the problem is that the repeater is designed to only allow one item per row, if that makes sense. It computes its height by * which does not work when multiple items occupy each row.

We could maybe call this a feature request, but I've got a lot of higher priority items to work on for now.

kseamon avatar Nov 03 '15 15:11 kseamon

Have the same issue so this feature would be great if it got implemented :+1:

mackelito avatar Dec 26 '15 20:12 mackelito

Perhaps there is someone who can point me in the direction how to solve this?

mackelito avatar Dec 28 '15 00:12 mackelito

Since we're now post 1.0, does anyone knows the state on this? I know that there is so much we can expect from a limited size team(which is doing a great job) but it seems to be a common UX gallery pattern for which frameworks like React is, unfortunately, eating Angular's lunch. @kseamon, it was mentioned in issue #5312 that it would be handled around 1.08rc. Is there an ETA to add this feature or should folks finding other workarounds?

gkohen avatar Feb 09 '16 16:02 gkohen

+1

jgaver avatar Feb 11 '16 15:02 jgaver

+1

jhunger avatar Feb 11 '16 16:02 jhunger

+1

ctwhome avatar Feb 17 '16 15:02 ctwhome

+1

arsonik avatar Feb 17 '16 15:02 arsonik

+1

ashokyadav006 avatar Feb 19 '16 05:02 ashokyadav006

+1

+1

sarod avatar Mar 01 '16 21:03 sarod

+1

smurugavel avatar Mar 03 '16 02:03 smurugavel

+1

casertillo avatar Mar 03 '16 23:03 casertillo

+1

Acarus avatar Mar 11 '16 11:03 Acarus

+1. md-virtual-repeat is a great directive but too limited for responsive design.

BenClaveau avatar Mar 14 '16 17:03 BenClaveau

+1

JonnyHeavey avatar Apr 26 '16 16:04 JonnyHeavey