mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	use exact search instead of fuzzy search for branch filter dropdown (#19893)
This commit is contained in:
		@@ -78,14 +78,14 @@ export function initRepoCommonBranchOrTagDropdown(selector) {
 | 
				
			|||||||
export function initRepoCommonFilterSearchDropdown(selector) {
 | 
					export function initRepoCommonFilterSearchDropdown(selector) {
 | 
				
			||||||
  const $dropdown = $(selector);
 | 
					  const $dropdown = $(selector);
 | 
				
			||||||
  $dropdown.dropdown({
 | 
					  $dropdown.dropdown({
 | 
				
			||||||
    fullTextSearch: true,
 | 
					    fullTextSearch: 'exact',
 | 
				
			||||||
    selectOnKeydown: false,
 | 
					    selectOnKeydown: false,
 | 
				
			||||||
    onChange(_text, _value, $choice) {
 | 
					    onChange(_text, _value, $choice) {
 | 
				
			||||||
      if ($choice.data('url')) {
 | 
					      if ($choice.attr('data-url')) {
 | 
				
			||||||
        window.location.href = $choice.data('url');
 | 
					        window.location.href = $choice.attr('data-url');
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    message: {noResults: $dropdown.data('no-results')},
 | 
					    message: {noResults: $dropdown.attr('data-no-results')},
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user