From 0e7791174d35f3e009aefe227992bc640980e830 Mon Sep 17 00:00:00 2001 From: wxiaoguang Date: Sun, 5 Jun 2022 16:10:30 +0800 Subject: [PATCH] use exact search instead of fuzzy search for branch filter dropdown (#19893) --- 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 3ddabe10f1..d1acf0c379 100644 --- a/web_src/js/features/repo-common.js +++ b/web_src/js/features/repo-common.js @@ -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')}, }); }