Closed shinorz0721 closed 6 years ago
@lim0721lim Thanks for the issue, this is an interesting use case. The point is that your App renders the template with the modal that is hidden initially. This hidden modal contains ui-scroll. The ui-scroll plays with geometry and visibility, this way he decides when and how many data should be retrieved to fill out the viewport. That's why we see only 5 rows when the modal is open; only 1 pack of datasource items had been requested. The viewport invisibility prevents other requests.
As a simple but dirty workaround I can suggest to increase buffer size
value from 5 (default) to, say, 30: buffer-size="30"
. In this case the
initial first request should be enough to fill out the viewport, and the
scrollbar should appear.
But the right solution is to render the ui-scroll only when the modal is
shown: <li ui-scroll ng-if="isModalOpen" ...>
. It is not obvious how to
do it without any Angular specific Bootstrap wrapper. Would you like to try
https://angular-ui.github.io/bootstrap/#!#modal ? This is another Angular
UI product. Right now I have no live example but it should be pretty easy
to integrate them both within a single app. Please let me know if you have
any issues with it!
With an example in the plunker: https://plnkr.co/edit/mJJkVr?p=preview