Skip to content

Custom search filtering algorithm #313

@negezor

Description

@negezor

Can we implement a custom search filtering algorithm? I would like to use fuzzy search, however this is not the only possible filtering option.

As far as I understand, changes need to be made here. And apparently we could normalize search.value once.

if (search.value && filterResults.value) {
fo = fo.filter((option) => {
return searchStart.value
? normalize(option[trackBy.value], strict.value).startsWith(normalize(search.value, strict.value))
: normalize(option[trackBy.value], strict.value).indexOf(normalize(search.value, strict.value)) !== -1
})
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions