From d0a2c1e82bf7d6505c268bc106d2ff57be6eb7d7 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 5 Jun 2022 00:02:10 +0800 Subject: [PATCH] use exact search instead of fuzzy search for branch filter dropdown (#19885) --- web_src/js/features/repo-common.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/web_src/js/features/repo-common.js b/web_src/js/features/repo-common.js index 89dae26277..b0ecc5a651 100644 --- a/web_src/js/features/repo-common.js +++ b/web_src/js/features/repo-common.js @@ -110,14 +110,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')}, }); }