autoComplete.js icon indicating copy to clipboard operation
autoComplete.js copied to clipboard

Match only one object

Open carkod opened this issue 4 years ago • 2 comments

Is your feature request related to a problem? Please describe. Match only one object. Currently the matching engine returns every property that has a match. e.g.:

[{
 "name": "Carlos",
 "location": "Spain",
},
{
 "name": "Johana",
 "location": "South Africa"
}]

If type "S" it will match "Carlos", "Spain", and "South Africa". Is there a way to only match "Carlos" and "South Africa"

Please Describe alternatives you've considered Feature request #48 seems to be something close to this, but apparently it hasn't been included in the current release?

Thank you @TarekRaafat

carkod avatar Mar 04 '20 19:03 carkod

Hi. Has this already been implemented by the data.filter config?

postatum avatar Sep 21 '21 12:09 postatum

We are experiencing this same issue at https://github.com/decidim/decidim.

It would be extremely helpful if preventing duplicate results was a configuration option instead of having to implement a custom filter for every use case (especially when we are using the same component for multiple use cases).

ahukkanen avatar Aug 02 '23 12:08 ahukkanen