-
Notifications
You must be signed in to change notification settings - Fork 43
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
Can't do pagination #85
Comments
🤷♂️ I can't remember, but I don't think the |
@jsumners Can you please explain (or give some example) how can I achieve it using the find method? |
I do not have access to an AD server. Please see the notice I added to the readme. |
Just out of curiosity, why do you want to go to the trouble to define a small pagesize and manage the paging yourself, if findUsers() has paging built-in and can return all your 2000 users at once (by automatically fetching and joining all necessary pages for you)? If I recall correctly, you don't specify that you want results from offset 201. Instead the query returns some object and you must pass that exact object to the next call, which returns an object again which you pass to the next call, repeat that until it is done. |
Let's say I have an unknown number of users (over 500k), and I have an application with UI. The UI can display only 200 users at a time (in a page). |
@yogiGueta I understand, I am using the activedirectory in a different scenario, thanks for the insight. And 500K is a serious number, for just 2000 I might still fetch them all at once and do a paged UI. It is none of my business but perhaps you can consider a UI design where the user is informed that there were more than {pagesize} hits for his initial query, then enable him to refine the query until there are less than {pagesize} hits.... |
You may need to use |
Hi,
I am trying to do some pagination without a success. I read a lot of posts, but I can't find a concrete answer.
My scenario is very simple:
I have AD with 2000 users, I want use findUsers() function and get only 200 users at a time,
so I configured:
General AD config:
activeDirectoryConfig.paged = true;
Opt config:
opts.paging = {
pageSize: 200,
};
Now I am getting the first 200 users (1-200), but how can I get the next 200 users (201-400)? What is the correct way to tell findUsers() to give me the next page (to start the fetching from offset 201 and not 0)?
Thanks,
BTW I am using [email protected].
The text was updated successfully, but these errors were encountered: