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

Allow resetting of the DataScroller #1119

Merged
merged 2 commits into from Oct 28, 2016
Merged

Conversation

mroskamp
Copy link
Contributor

It'd be nice to be able to use the DataScroller in such a way that it can reused for different data sets. For example, an infinite scrolling list that's searchable by the user.

When the user first arrives on the page, a set of search results appear. The user can then change the search criteria to provider better results for their specific need. The onLazyLoad handler is aware of the search criteria and returns the data accordingly. In order for this to work though, the scroller needs to be reset, so the loaded data starts again at the beginning.

It'd be nice to be able to use the DataScroller in such a way that it can reused for different data sets. For example, an infinite scrolling list that's searchable by the user.

When the user first arrives on the page, a set of search results appear. The user can then change the search criteria to provider better results for their specific need. The onLazyLoad handler is aware of the search criteria and returns the data accordingly. In order for this to work though, the scroller needs to be reset, so the loaded data starts again at the beginning.
@cagataycivici
Copy link
Member

Don't we need to call load() after reset() as you clear the dataToRender(). reset just clears the data I from what I see?

@mroskamp
Copy link
Contributor Author

Yes, you're right. I realized that last night, I've made the change to call load().

@cagataycivici cagataycivici added this to the 1.0.0-RC1 milestone Oct 28, 2016
@cagataycivici cagataycivici self-assigned this Oct 28, 2016
@cagataycivici cagataycivici added the Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add label Oct 28, 2016
@cagataycivici cagataycivici merged commit ee1571b into primefaces:master Oct 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement Issue contains an enhancement related to a specific component. Additional functionality has been add
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants