vue-bootstrap-typeahead icon indicating copy to clipboard operation
vue-bootstrap-typeahead copied to clipboard

Remove filter based only on search

Open eagleDiego opened this issue 6 years ago • 2 comments

Currently, the results array is filtered based on the data passed by the serializer function, or in the suggestion slot.

In my user case, I retrieve from the server results that are still relevant, although in the drop-down I don't show why they are relevant.

For example, for query = 'her' I may return from the API:

[
  {
    "code": "XYZ",
    "name":"triplet",
    "location":"here"
  }
]

But my serializer function only returns triplet - XYZ.

The matchedItems() function will not show this result because it doesn't pass the RegEx.

It would be useful to have a way of bypassing the regular expression and just show all results from data.

eagleDiego avatar May 15 '19 12:05 eagleDiego

Hi, same use case here. Need a new release with this feature please !

llienard avatar Aug 27 '19 13:08 llienard

I merged a fix for this into my fork (https://github.com/mattzollinhofer/vue-typeahead-bootstrap) of this project that I'm actively maintaining. Set the showAllResults flag and it will disable the filtering you're describing.

You can find it on npm here: https://www.npmjs.com/package/vue-typeahead-bootstrap.

I hope this helps!

mattzollinhofer avatar Feb 26 '20 02:02 mattzollinhofer