-
Notifications
You must be signed in to change notification settings - Fork 547
ui-scroll does not work (v. 0.1.0) - virtual scrolling #154
Comments
Same problem. |
This problem happened to me when the ng-scroll directive was inside of a ng-switch block. The result is that the height of each item is calculated to be zero. |
Can you give me a little more details? If I understand the stackoverflow issue correctly it is about forcing the scrollbar on the viewport event though there is no items - well, this can be done with proper styling. Are having the same problem? |
The problem is that when the scroll item height is calculated to be zero, the following problems occur:
In my case, I had a valid datastore with around 100 elements. My ng-scroll-viewport and ng-scroll directives were within an ng-switch directive. This caused a problem during page load, when the ng-scroll directive attempts to determine the calculated height of the scroll items: the ng-scroll directive forced them to be non-visible with a resulting height of zero. If I moved the ng-scroll outside of the ng-switch, it works properly. |
The same problem applies when ng-scroll is inside an ng-if block or within an Angular Bootstrap accordian. It works fine when using ng-show. Could this be a directive priority issue? |
Hmm... It looks like a problem with height calculation of invisible (disabled) items. Can you throw together a quick repro? I will have a look |
@mfeingold Here is a Plunker with a reproduction of the error: http://plnkr.co/edit/QmugOwohDmG1ojXBea1E The instance of ng-scroll inside the tabset is not visible because the directive adds no elements to the DOM, despite fetching all items from the datasource. It is a result of the zero height problem |
Thank you for the repro. |
Just patched it up. Please have a look and close the issue if you feel so. |
Yes, that fixed it. Thanks! It looks like I don't have permissions to close this issue, as I'm not the original poster. |
I have described the issue here:
http://stackoverflow.com/questions/20873894/angular-ui-ui-utils-ui-scroll-does-not-work-v-0-1-0
-V
The text was updated successfully, but these errors were encountered: