mattzollinhofer/vue-typeahead-bootstrap

When selecting an item from the list the input function is called again wasting an api call

Opened this issue · 1 comments

The REST API gets called incorrectly twice.

First time, correctly, when you enter initial characters
Second time when using the mouse to select an item from the list.

This causes unnecessary calls to the server wasting resources.

I've run into this issue and couldn't have let it go. I've worked around it in my @input function, pseudo code:

IF NOT item is selected OR substring of query does not contain item label
doUpdate(query)

Hope it helps someone until this is fixed.