Skip to content

Commit e99a4ae

Browse files
chargomebitsandfoxes
authored andcommitted
feat(platform): Apply stricter matching in platform selector (#13358)
1 parent 697cbeb commit e99a4ae

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/components/platformSelector/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,10 @@ export function PlatformSelector({
7878
}
7979
// any of these fields can be used to match the search value
8080
const keys = ['title', 'name', 'aliases', 'sdk', 'keywords'];
81-
const matches_ = matchSorter(platformsAndGuides, searchValue, {keys});
81+
const matches_ = matchSorter(platformsAndGuides, searchValue, {
82+
keys,
83+
threshold: matchSorter.rankings.ACRONYM,
84+
});
8285
// Radix Select does not work if we don't render the selected item, so we
8386
// make sure to include it in the list of matches.
8487
const selectedPlatform = platformsAndGuides.find(

0 commit comments

Comments
 (0)