use exact search instead of fuzzy search for branch filter dropdown (#19893)

This commit is contained in:
wxiaoguang 2022-06-05 16:10:30 +08:00 committed by GitHub
parent 736b7b25a4
commit 0e7791174d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,14 +78,14 @@ export function initRepoCommonBranchOrTagDropdown(selector) {
export function initRepoCommonFilterSearchDropdown(selector) {
const $dropdown = $(selector);
$dropdown.dropdown({
fullTextSearch: true,
fullTextSearch: 'exact',
selectOnKeydown: false,
onChange(_text, _value, $choice) {
if ($choice.data('url')) {
window.location.href = $choice.data('url');
if ($choice.attr('data-url')) {
window.location.href = $choice.attr('data-url');
}
},
message: {noResults: $dropdown.data('no-results')},
message: {noResults: $dropdown.attr('data-no-results')},
});
}