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

ui-select pagination by scrolling #375

Closed
cabloo opened this issue Oct 4, 2016 · 4 comments
Closed

ui-select pagination by scrolling #375

cabloo opened this issue Oct 4, 2016 · 4 comments

Comments

@cabloo
Copy link
Contributor

cabloo commented Oct 4, 2016

when you scroll near the end of a list in a ui-select, it should infinite scroll on to the next page. There may even be a setting for this.

@cabloo cabloo added the upcoming label Oct 4, 2016
@cabloo cabloo added outsource and removed upcoming labels Nov 9, 2016
@cabloo cabloo added ready and removed outsource labels Dec 6, 2016
@Andrfas
Copy link
Contributor

Andrfas commented Dec 13, 2016

@cabloo sorry not sure what you want to do here.
For example I took Client field on http://localhost:8080/#/hardware/server/provision page (/scp-theme-admin/app/hardware/server/provision/provision.form.pug:9).
It loads list via request to server. So will show what server will return.

Do you mean implementing infinite scroll right there? If yes - I don't think we can do that via some directive params, but probably should write our own component for that, since that will require handling scroll event in results list.

Here are docs for ui-scroll-choices
https://github.com/angular-ui/ui-select/wiki/ui-select-choices

@cabloo
Copy link
Contributor Author

cabloo commented Dec 13, 2016

@Andrfas figured that might be the case. Can you try this solution (the one from tushariscoolster)? angular-ui/ui-select#221 (comment)

@cabloo
Copy link
Contributor Author

cabloo commented Dec 13, 2016

I'd like to use that one so we can reuse the scroll completion lib in other locations as well. This solution would also work: https://github.com/hyzhak/ui-select-infinity but is specific to ui-select so only use it if you can't get the previous one working.

@Andrfas Andrfas added in progress and removed ready labels Jan 3, 2017
@Andrfas
Copy link
Contributor

Andrfas commented Jan 4, 2017

@cabloo The first variant is not so good for us - it requires broadcasting an event in scope. And the only way I see to make it working - to broadcast event in Select factory on rootScope, which is not good I think.
So I've implemented the second one you've suggested. See scp-angle repo for code:
https://github.com/synergycp/scp-angle/pull/39

@cabloo cabloo closed this as completed Jan 5, 2017
@cabloo cabloo removed the in progress label Jan 5, 2017
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

2 participants