Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataScroller: Lazy loading event 'first' property #153

Closed
mattem opened this issue Mar 29, 2016 · 4 comments
Closed

DataScroller: Lazy loading event 'first' property #153

mattem opened this issue Mar 29, 2016 · 4 comments
Assignees

Comments

@mattem
Copy link

mattem commented Mar 29, 2016

Maybe I'm using this incorrectly, but when using the DataScroller with lazy loading, the first property of the event does not match that of the index of top visible row in the list when scrolling up (returning from the bottom of the list), the number just increases by rows each time.

For example, markup is

<p-dataScroller [value]="rows" [inline]="true" [rows]="20" scrollHeight="500px" [lazy]="true" (onLazyLoad)="onLazyLoad($event)">
    <template #row>
        <p>{{row.SeqId}} {{row.MainTitle}}</p>
    </template>
</p-dataScroller>

The onLazyLoad event handler just logs out the event.
Is this the expected behavior? The demo does not seem to do this? Using version 0.9.1

@cagataycivici cagataycivici added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Apr 7, 2016
@cagataycivici cagataycivici added this to the 1.0.0-beta.1 milestone Apr 7, 2016
@cagataycivici cagataycivici self-assigned this Apr 7, 2016
@cagataycivici
Copy link
Member

Looks like a bug, being worked on.

@cagataycivici
Copy link
Member

Oh, you mean going up, but the load is only called when going down with scroller. It should not be called when scrolling up to view already loaded elements.

@mattem
Copy link
Author

mattem commented Apr 9, 2016

Here is a plunker that shows this behaviour.
http://plnkr.co/edit/PHuVeQB5cLxMYSORepUf?p=preview

I guess my use case here is not actually infinite scrolling, but more just using it for the lazy loading of items in to the list. When the bottom of the list is reached, and no more items are available to be loaded in, then the scrolling exhibits this behaviour. It can also be reproduced by not adding any items to the list within the onLazyLoad callback.
I appreciate that this may not be supported, as the use case is slightly different.

@cagataycivici cagataycivici removed this from the 1.0.0-beta.1 milestone Apr 10, 2016
@cagataycivici
Copy link
Member

This seems like the expected behavior for me.

@mertsincan mertsincan removed the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Oct 18, 2018
atretyak1985 pushed a commit to Nanitor/primeng that referenced this issue Jul 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants