You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to detect when the suggestions are rendered, and I think an event emit could be added when the component renders the suggestion and hides it.
The problematic scenario is:
I need to allow the browser autofill as long as the autosuggest is not rendering any suggestion.
When the suggestion is rendered, I need to detect it, and change the autocomplete property in the input-props property to disable the browser autofill.
The case scenario would be the following:
Give a default value to autocomplete attribute in input-props.
This value enables browser autofill.
User ignores browser autofill and starts typing in the vue-autosuggest input, which renders some suggestions.
Detect through the an emitted event such as renderedSuggestion that the suggestion is being shown
Change the value of the autocomplete property to hide the browser autofill.
I would also need to detect when the suggestions are hidden, to restore the property to it's default value.
Suggested solution:
Add new event to be triggered when the suggestion is shown and hidden.
If you agree on the solution, I'll try to get some time to do a Pull request.
Also, if you can think about a better name for the emitted event, please do tell.
Thanks!
The text was updated successfully, but these errors were encountered:
Yea sounds like a good enhancement since @ events are more the vue way. The component already has a way of handling open/close events with should-render-suggestions. You can perform side effects inside this function based on what you determine.
New showRenderedSuggestions and hideRenderedSuggestions events to facilitate event handling when
suggestions appear and disappear
darrenjennings#178 enhancement
I'm trying to detect when the suggestions are rendered, and I think an event emit could be added when the component renders the suggestion and hides it.
The problematic scenario is:
I need to allow the browser autofill as long as the autosuggest is not rendering any suggestion.
When the suggestion is rendered, I need to detect it, and change the autocomplete property in the
input-props
property to disable the browser autofill.The case scenario would be the following:
Give a default value to
autocomplete
attribute ininput-props
.This value enables browser autofill.
User ignores browser autofill and starts typing in the vue-autosuggest input, which renders some suggestions.
Detect through the an emitted event such as
renderedSuggestion
that the suggestion is being shownChange the value of the
autocomplete
property to hide the browser autofill.I would also need to detect when the suggestions are hidden, to restore the property to it's default value.
Suggested solution:
Add new event to be triggered when the suggestion is shown and hidden.
If you agree on the solution, I'll try to get some time to do a Pull request.
Also, if you can think about a better name for the emitted event, please do tell.
Thanks!
The text was updated successfully, but these errors were encountered: