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

What is the point of providing the number of results to show? #55

Open
simonh1000 opened this issue Jul 1, 2017 · 0 comments
Open

What is the point of providing the number of results to show? #55

simonh1000 opened this issue Jul 1, 2017 · 0 comments

Comments

@simonh1000
Copy link
Contributor

The question came to me when considering a css styles autocomplete. Type in color and - for 5 results - you get a bunch of results border-...-color. I'd like that for onDownArrow you start circling through the rest of the acceptable results.

As things stand I would need to handle that in acceptableStyles and add to my model an offset to drop from the beginning of the results. But at that stage I might as well drop all results beyond the 5th as well.

At it feels as though that is true more generally. After identifying the list of acceptable candidates I could drop the excess. I presume that's what you do with the integer that I pass anyway. As a result, it seems to me that you get the exact same functionality by asking the user to chop the number of acceptables, count the length of what is passed if you need to, and reduce one parameter from the API.

An alternative would be that the library handles the showing of surplus acceptables in the way I describe above, but I think you are delegating decisions on down arrows from the bottom item of the list back to the developer, which is reasonable.

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

1 participant