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

Autocomplete from the most suitable suggestion element? #41

Closed
1 of 3 tasks
kaskar2008 opened this issue Apr 4, 2018 · 3 comments
Closed
1 of 3 tasks

Autocomplete from the most suitable suggestion element? #41

kaskar2008 opened this issue Apr 4, 2018 · 3 comments
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on

Comments

@kaskar2008
Copy link
Member

I'm submitting a ...

  • bug report
  • feature request
  • support request

What is the expected behavior?

When the suggestions list is not empty - get the rest of the text from the element, that complete the most.

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

In some cases this type of autocompletion is the most convenient (for example, if the component being used as a search box for some results)

@kaskar2008 kaskar2008 added enhancement New feature or request question Further information is requested labels Apr 4, 2018
@Raiondesu Raiondesu changed the title Autocomplete from the suggestion element? Autocomplete from the most suitable suggestion element? Apr 4, 2018
@kaskar2008 kaskar2008 added this to To do in Main features via automation Apr 5, 2018
@Raiondesu
Copy link
Contributor

Raiondesu commented Apr 5, 2018

@kaskar2008, this is a subject for a minor, I think, because this requires rework of markup & CSS classes. OR, at least, of logic.

@Raiondesu Raiondesu added next release This is a thing to include in the next release minor This is a thing to include in the next minor release labels Apr 5, 2018
@Raiondesu
Copy link
Contributor

Raiondesu commented Apr 6, 2018

I just thought about all this, and now such a functionality seems wrong to me. Mainly because it's not always useful - the case of suggestions that exclusively begin with the query is not 100% common. Most of the time, the suggestion only contains the text that user types.

I can only think of google suggestions in their search bar as an appropriate use-case for this.

As for now, the thing that you request can be (much more easily!) achieved outside the vue-simple-suggest, by using a custom input, somewhat like this:

<vue-simple-suggest v-model="query" ref="autocomplete">
  <overshadow-input :bolden-value="query" :overshadow="$refs.autocomplete.suggestions[0].title"/>
</vue-simple-suggest>

where overshadow-input is an input component that can append a text overshadow and bold a certain part of it.

So the whole thing would not only add the un-needed internal complexity, but is also more than easily solved outside of the component by a programmer using it.

@Raiondesu Raiondesu added invalid This doesn't seem right wontfix This will not be worked on and removed minor This is a thing to include in the next minor release next release This is a thing to include in the next release question Further information is requested labels Apr 6, 2018
@kaskar2008
Copy link
Member Author

I guess you are right. It was only a proposal tho.

Main features automation moved this from To do to Done Apr 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on
Projects
Main features
  
Done
Development

No branches or pull requests

2 participants