This repository was archived by the owner on Sep 5, 2024. It is now read-only.
Setting height of mdVirtualRepeatContainer #10317
Labels
resolution: works as expected
The functionality works as designed and documented.
I have achieved excellent performance improvements by switching from a vanilla ngRepeat to mdVirtualRepeatContainer. However I'm having a problem when it comes to setting the height of the container. My page needs to be responsive or at the very least sized appropriately for a given screen. I can only get the directive to work if I set its height explicitly in my CSS, which means if someone has a smaller or larger monitor the height won't be ideal.
I've tried creating a directive that changes the height of the container element in the directive's link() function using
elem.css('height', '600px');
Inspection proves that the resizing worked.However now none of the rows in the container will load. I end up with a big empty div.
I've tried several things from this thread including:
mdVirtualRepeatContainer.updateSize();
from inside my custom directive.scope.$broadcast('$md-resize')
angular.element(window).triggerHandler('resize');
But none of these have worked.
Is there some kind of recognized way of setting the height of the '' element that doesn't break the whole thing?
Thanks.
The text was updated successfully, but these errors were encountered: