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

Help needed: how to handle a long list of results? #920

Closed
realtebo opened this issue Jul 31, 2019 · 2 comments
Closed

Help needed: how to handle a long list of results? #920

realtebo opened this issue Jul 31, 2019 · 2 comments

Comments

@realtebo
Copy link

What is expected to do when handling a long list of results?

I limited search to be madre only with a min of 4 chars, but anyway in some cases it return over 200 results.

Must I implement in some way the pagination or infinte scrolling? If this, can you point me to documentation where is explained how to do it?

If not, is there a way to show an error? For example, if I got more than 30 results, i'd like to show 'Too many results, enter more words to refine search' or similar. But, in this case, how can I handle this behaviours with your component?

Thanks in advance

@doits
Copy link
Contributor

doits commented Jul 31, 2019

You could handle this server side: Only return first best matching n results.

Or client side: Make the function that fetches server results only return first n options (even if more are returned from the server).

If you want to show a hint to the user that there are more than shown, additionally add a disabled option at the end with a text as a hint (or maybe even at the beginning so the user sees it right away). You can add this option at the server or client side.

To actually have disabled options though, see #921, which is not yet merged here.

@realtebo
Copy link
Author

realtebo commented Aug 1, 2019

Thanks, but this is not a good UX for me. I will switch to another package, I absolutely need an infine scroll, a pagination, title and bottom, and so on. Probably a coworker will create one specific for our need.

Thanks a lot for your work. We're still using it in a good amount of places. The slot system allowed us for heavy customs

@realtebo realtebo closed this as completed Aug 1, 2019
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