angular-filter icon indicating copy to clipboard operation
angular-filter copied to clipboard

fuzzyBy - add support for multiple keys

Open a8m opened this issue 10 years ago • 9 comments

a8m avatar Feb 24 '15 14:02 a8m

What do you mean?

mallowigi avatar Feb 24 '15 15:02 mallowigi

change it to work like filterBy will make it more robust.

a8m avatar Feb 24 '15 16:02 a8m

Would love this. Currently I can get away with just using fuzzy but I don't need to search data such as email. For example in the following I only want to search first_name, last_name, and company. However I don't care about results from email and bio.

[
    {
        "first_name": "Rafael",
        "last_name" : "Gomez",
        "email"     : "[email protected]",
        "company"   : "Libero Nec Ligula LLC",
        "bio"       : "Lorem"
    },
    {
        "first_name": "Ivor",
        "last_name" : "Clayton",
        "email"     : "[email protected]",
        "company"   : "Dui Consulting",
        "bio"       : "Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Curabitur sed"
    },
    {
        "first_name": "Armando",
        "last_name" : "Dotson",
        "email"     : "[email protected]",
        "company"   : "Integer Inc.",
        "bio"       : "Lorem ipsum"
    }
]

Voziv avatar Oct 07 '16 13:10 Voziv

+1

Shadowstep33 avatar Jan 19 '17 08:01 Shadowstep33

+1, would be great

sogoodday avatar Jan 31 '17 18:01 sogoodday

+1

kylemantesso avatar Feb 02 '17 02:02 kylemantesso

Any update on this? It's been 3 years.

RinMinase avatar Apr 26 '18 03:04 RinMinase

+1

cnelissen avatar Jul 25 '18 23:07 cnelissen

An easy workaround for this is to combine it with the searchField filter, for example:

collection | searchField: 'property1': 'property2' | fuzzyBy: 'searchField': search

Obviously it would be better if fuzzyBy could just accept multiple properties though.

cnelissen avatar Jul 25 '18 23:07 cnelissen