Problem description:
When trying to use matchSorter.rankings.NO_MATCH with a custom key, the threshold is not respected. Instead it returns a subset of results, as opposed to all the results.
If I instead transform the array into a list of string it works as expected.
Suggested solution:
I very well could be using the keys option incorrectly. If this seems like a valid failing case, I'm happy to open a PR.
match-sorter
version: 4.0.2node
version: 10 & 12npm
(oryarn
) version: yarn v1.21.1Relevant code or config
Reproduction repository: https://codesandbox.io/s/matchsorter-threshold-bug-bbu2r
Problem description: When trying to use
matchSorter.rankings.NO_MATCH
with a customkey
, the threshold is not respected. Instead it returns a subset of results, as opposed to all the results.If I instead transform the array into a list of string it works as expected.
Suggested solution: I very well could be using the
keys
option incorrectly. If this seems like a valid failing case, I'm happy to open a PR.