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

virtual-repeat: does not render items if it begins in hidden state #4336

Closed
uriva opened this issue Aug 26, 2015 · 18 comments
Closed

virtual-repeat: does not render items if it begins in hidden state #4336

uriva opened this issue Aug 26, 2015 · 18 comments
Labels
g3: reported The issue was reported by an internal or external product team. resolution: fixed
Milestone

Comments

@uriva
Copy link

uriva commented Aug 26, 2015

http://codepen.io/uriva/pen/PqMMqV

@Anaphase
Copy link
Contributor

+1 I just ran across this issue too

@ThomasBurleson ThomasBurleson modified the milestone: 0.12.0 Sep 2, 2015
@Anaphase
Copy link
Contributor

Anaphase commented Sep 8, 2015

This could possibly be related to a similar bug documented in #4499.

@jelbourn jelbourn added the g3: reported The issue was reported by an internal or external product team. label Sep 18, 2015
@Anaphase
Copy link
Contributor

Anaphase commented Oct 1, 2015

@kseamon
Copy link
Contributor

kseamon commented Nov 20, 2015

Fixed as of 1.0-rc4

@kseamon kseamon closed this as completed Nov 20, 2015
@apils
Copy link

apils commented Feb 24, 2016

Probably related, virtual-repeat does not render when it is in a sidnav that is initially hidden. I'm using 1.0.5 and it's still happening. Works fine in sidenav that is initially open.

@impressto
Copy link

I am using 1.1.0-rc2 and it is still an issue. I was setting the scope for my repeater items before setting visible the md-virtual-repeat component. When setting the component visible, I then used this hack to force a redraw - angular.element(window).triggerHandler('resize');

@demsey2
Copy link

demsey2 commented Aug 8, 2016

I am on 1.1.0-rc5 and the problem still exists.

@jbernard1
Copy link

Also on 1.1.0-rc5 and the problem persist, ill test it on rc4

@vucalur
Copy link

vucalur commented Sep 5, 2016

I came across this thread when looking for a cause of my virtualRepeat staying hidden.
Since it was in nested UI-Router states, I though bug described here was the case.

Turned out the cause was trivial:
I haven't added CSS height property to md-virtual-repeat-container element. (width for horizontal mode)
Analogous ng-repeat works without it,
so it should be mentioned in the docs…

Unrelated to the bug, but I hope someone will find this helpful.

@chas-bean
Copy link

chas-bean commented Sep 7, 2016

My quick hack was just wrapping the md-virtual-repeat-container with an ng-if:

<div ng-if="someCtrl.isSidenavReady">
<md-virtual-repeat-container>
<md-virtual-repeat md-on-demand md-virtual-repeat="thing in someCtrl.things">
</md-virtual-repeat>
</md-virtual-repeat-container>
</div>

I set the flag to true when the button that opens the sidenav is clicked. Causes the repeater to re-draw and works for me temporarily!

@Anaphase
Copy link
Contributor

Anaphase commented Sep 7, 2016

@CharlesBean this is what I ended up doing as well

@aeslinger0
Copy link

Still an intermittent problem in 1.1.4. I don't think it matters if it begins in a hidden state like the title might suggest. I could reproduce it intermittently whenever it would go from hidden to shown regardless of what the state started at upon page load. The ng-if work-around would have worked, but I couldn't use it in my case. However, I found that toggling just the visibility via ng-style also works around the issue.

@cmacdonnacha
Copy link

+1 still an issue for me in 1.1.3

@Splaktar
Copy link
Contributor

Splaktar commented Dec 10, 2017

The issue within a SideNav was fixed in 1.1.2 (#7309).

If you are still seeing this issue in 1.1.5, we're tracking an issue when inside of md-tabs in #11002. If you can provide some information there and a CodePen reproduction, it would be appreciated.

If you are seeing this outside of md-tabs, please open a new issue with a reproduction.

@aj-r
Copy link

aj-r commented Feb 21, 2018

@Splaktar I'm still getting this issue in 1.1.7 when a <md-virtual-repeat-container> is inside a <md-menu-content>. The content is initially blank when I open the menu, but as soon as I resize the window, the content appears.

Copy-and-pasting the same <md-virtual-repeat-container> outside the <md-menu-content> works - the items appear right away without resizing.

I'm guessing this has the same cause as the md-tabs issue.

I can workaround this by manually firing a resize event after opening the menu.

@aj-r
Copy link

aj-r commented Feb 21, 2018

I'm not sure how I unassigned @kseamon but it was unintentional.

@cmacdonnacha
Copy link

Yea. This is quite a big issue for us. Having to manually firing a resize event is just too hacky.

@Splaktar
Copy link
Contributor

@aj-r no problem on the unassignment, GitHub just automatically does that since he is no longer a member of this team.

Can you please open a new issue for this issue with menus and include a CodePen demo? Please reference this issue in the new issue.

@angular angular locked as resolved and limited conversation to collaborators Jun 18, 2018
@Splaktar Splaktar changed the title md-virtual-repeat does not render items if it begins in hidden state virtual-repeat: does not render items if it begins in hidden state Jun 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
g3: reported The issue was reported by an internal or external product team. resolution: fixed
Projects
None yet
Development

No branches or pull requests