darrenjennings / vue-autosuggest

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

There is no disabled input props #170

Closed mhlsf closed 4 years ago

mhlsf commented 4 years ago

Problem description:

We should be able to set a disabled state for the input.

Suggested solution:

Adding a props to toggle disabled state

darrenjennings commented 4 years ago

This is already available via: https://github.com/darrenjennings/vue-autosuggest#inputprops

can add any props to  as the component will v-bind inputProps. Similar to rest spread in JSX. See more details here: https://vuejs.org/v2/api/#v-bind. The name attribute is set to "q" by default.

e.g.

<vue-autosuggest :input-props="{ disabled: true }"
  ...