darrenjennings / vue-autosuggest

🔍 Vue autosuggest component.
https://darrenjennings.github.io/vue-autosuggest
MIT License
621 stars 91 forks source link

Expect to add Autocomplete off to the default config #129

Closed cdwmhcc closed 5 years ago

cdwmhcc commented 5 years ago

Relevant code or config

image

What you did:

What happened:

image

Problem description:

Suggested solution:

The autocomplete attribute is not added by default. Expect to add it to the default config And set the default value to off No manual configuration required

darrenjennings commented 5 years ago

ah it seems that it is always "off" to start, but then inputProps are blowing away the defaults sometimes. I see the fix and can push up in a bit.

cdwmhcc commented 5 years ago

@darrenjennings

image

image

I seem to be in a bit of trouble. The interface returns four items. But only three items displayed in the components. I don't know why?

darrenjennings commented 5 years ago

@cdwmhcc it's hard to debug your program with limited information but I would be willing to bet you are filtering that list and "webstorm" doesn't have a p in it.

cdwmhcc commented 5 years ago

@cdwmhcc it's hard to debug your program with limited information but I would be willing to bet you are filtering that list and "webstorm" doesn't have a p in it.

I need to write you an example. What time do you rest?

darrenjennings commented 5 years ago

Would be great to see a codesandbox reproducing the error. I am in the process of moving across the country, so am unable to determine when I can get to this next, but will keep checking back.

cdwmhcc commented 5 years ago

Would be great to see a codesandbox reproducing the error. I am in the process of moving across the country, so am unable to determine when I can get to this next, but will keep checking back.

https://codesandbox.io/s/codesandbox-nuxt-tnr46?fontsize=14

search key : 'p'

darrenjennings commented 5 years ago

Yea if you want to return whatever comes back from the api, don't filter the options by name, just return the data from the response. i.e. instead of returning filteredOptions just return suggestions

<vue-autosuggest
  v-model="query"
  :suggestions="suggestions"
cdwmhcc commented 5 years ago

Yea if you want to return whatever comes back from the api, don't filter the options by name, just return the data from the response. i.e. instead of returning filteredOptions just return suggestions

<vue-autosuggest
  v-model="query"
  :suggestions="suggestions"

I'm like a fool. It's amazing that I didn't see it!