Skip to content
This repository was archived by the owner on Sep 5, 2024. It is now read-only.

Virtual repeat starting off empty #3807

Closed
phouri opened this issue Jul 18, 2015 · 2 comments
Closed

Virtual repeat starting off empty #3807

phouri opened this issue Jul 18, 2015 · 2 comments
Assignees
Milestone

Comments

@phouri
Copy link

phouri commented Jul 18, 2015

I am playing with the new virtual repeat (which imo should be part of ng-repeat, since it's so awesome), but I am having a weird problem that it doesn't render anything until you scroll.

I.e. I see the container and everything, and the scrollbar is there (and is calculated effectively), but it's empty until I scroll once and then it's back to normal.

Also, another issue, I am trying to use md-auto-shrink, and if I don't specify a height to the md-virtual-repeat-container it doesn't have a height at all (i.e. 0).

I am getting the items from the server, they aren't present immediately.

You can see the issue here: http://plnkr.co/edit/JN1VbZhHmYYnwhGNNSXl?p=preview

Also if you remove the height you can see my other issue, maybe worth separating them.

Edit: I played with it some more, the auto height seems to work, but the init phase is weird, it has to have items AND some starting height for it to work.
Also, the md-virtual-repeat-scroller suffers from extra height due to line breaks (i.e. setting font-size to 0 fixes this but f*** up everything else inside), so when there is only 1 item, the auto shrink works but the scroll bar is still there.

@phouri
Copy link
Author

phouri commented Jul 22, 2015

Any updates?

@kseamon
Copy link
Contributor

kseamon commented Aug 11, 2015

For the font-size issue, you can probably set the scroller's font-size to 0 and override it back to the original size for the repeated elements.

I'll address the container height issues in another PR.

kennethcachia pushed a commit to kennethcachia/material that referenced this issue Sep 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants