[Vuejs]-Space character doesn't get recognized in lodash's debounce method with b-taginput in buefy?

0👍

The source code indicates that @typing trims the input before emitting it. This leaves a couple options, the best one (by far) is to pre-fetch the unfiltered list. With the list in hand, you can filter exactly as the example code does, searching for the input string within the list.

(The example code works because the empty string '' emitted by typing a space is "found" in every string)

Think about this: you’re debouncing the API because you’re concerned about hitting it too hard. Drop the debounce and just hit it once. Worried that fetching all tags is too long to wait? Just wait once and never wait again (consider that you were willing to incur this wait on every blank input).

Leave a comment