Autocomplete with select & custom value
-
I want to do an autocomplete so that I can choose and that the entered value would remain
for example https://darrenjennings.github.io/vue-autosuggest/
how do i make it out of the box?
-
Like that? https://quasar.dev/vue-components/select#Example--Autocomplete-on-more-than-2-chars
You can lower the filter to one character, then it behaves the same as your example.
Scott
-
@s-molinari But it does not work, can you give an example in codepen.io?
-
@OnlyReFLeX it’s in the examples @s-molinari
linked https://codepen.io/metalsadman/pen/wLaaXB?&editable=true&editors=101 type letter/s of the options for Google/Facebook/Twitter/Apple/Oracle.
-
@metalsadman but I need to be able to enter any value
-
look at the example carefully https://darrenjennings.github.io/vue-autosuggest/
-
@OnlyReFLeX - Ah, you mean to filter on any letter matches within the options. Then you just need to change the filterFn method.
Scott
-
@s-molinari No, you do not understand
-
I want my value to be entered, and select worked like hints
-
And that is what I am suggesting. You need to change the filter method. The options can be “hints”. It’s all up to you.
Scott
-
@s-molinari Show me please i can’t figure out how to do it
-
Give me some sample data of your “hints”?
Scott
-
I need the same behavior as here https://darrenjennings.github.io/vue-autosuggest/
-
just change the filterFunction like @s-molinari suggested :x. use String.includes to filter https://codesandbox.io/s/codesandbox-app-0ybb3. for the styling see the docs again.