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

add sort function prop #302

Open
1 of 3 tasks
shrpne opened this issue Apr 3, 2020 · 0 comments
Open
1 of 3 tasks

add sort function prop #302

shrpne opened this issue Apr 3, 2020 · 0 comments

Comments

@shrpne
Copy link
Contributor

shrpne commented Apr 3, 2020

I'm submitting a ...

  • bug report
  • feature request
  • support request

What is the current behavior?

For now, there is no "official" way to sort suggestions depending on a search query.
I have tried to workaround it by doing sort logic inside list prop function. But using list as non-async function leads to unfixable bug, described in the #301

What is the expected behavior?

I expect to pass a function into sort prop, with parameters like this: sort(a, b, query) {}

What is the motivation / use case for changing the behavior?

I want to sort things :)
For example, I have a list: [Facebook, Faceapp, Facetime, Face]
And I want to move Face in the first position when user inputs Face. I mean exact match moves to the top of the list.
Without such sort and with :max-suggestions=3 user even will not see desired Face in the suggestions at all.

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