Skip to content

How to implement search matching sort function? #252

Description

@invious

I have this function which

    _handleSort = (a, b, input_string) => {
        let distance = this.levenshtein.get(a.name, input_string) - this.levenshtein.get(b.name, input_string)
        console.log(`a:${a.name}, b:${b.name}, input:${input_string}`)
        return distance;
    }

How can I make it so that the results are sorted by this function as I type in the AsyncTypeAhead

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions