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

Exclude items from autosuggestions #889

Open
monsieurtanuki opened this issue Mar 11, 2024 · 0 comments
Open

Exclude items from autosuggestions #889

monsieurtanuki opened this issue Mar 11, 2024 · 0 comments

Comments

@monsieurtanuki
Copy link
Contributor

Why - Problem description

cf. openfoodfacts/smooth-app#5096 by @g123k:

In many parts of the edition, we have an auto-completion feature.
However, this is a nonsense to list an item… which is already selected.

What - Proposed solution

The first thing to do would be to add a parameter to the autosuggestion methods: a list of items to exclude.
Then, if the developer asks for 10 items and we exclude 2 items, we should ask the server for 10+2 = 12 items and return the first 10 items that are not in the 2-item list.

Alternatives you've considered

Of course if the server could accept a list of items to exclude it would be better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant