mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-11-04 01:34:27 +00:00 
			
		
		
		
	Make a distinction between active and selected in the issue author dropdown (#30207)
				
					
				
			Signed-off-by: Yarden Shoham <git@yardenshoham.com>
This commit is contained in:
		@@ -149,7 +149,9 @@ function initRepoIssueListAuthorDropdown() {
 | 
				
			|||||||
    $searchDropdown.dropdown('refresh');
 | 
					    $searchDropdown.dropdown('refresh');
 | 
				
			||||||
    // defer our selection to the next tick, because dropdown will set the selection item after this `menu` function
 | 
					    // defer our selection to the next tick, because dropdown will set the selection item after this `menu` function
 | 
				
			||||||
    setTimeout(() => {
 | 
					    setTimeout(() => {
 | 
				
			||||||
      menu.querySelector('.item.active, .item.selected')?.classList.remove('active', 'selected');
 | 
					      for (const el of menu.querySelectorAll('.item.active, .item.selected')) {
 | 
				
			||||||
 | 
					        el.classList.remove('active', 'selected');
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      menu.querySelector(`.item[data-value="${selectedUserId}"]`)?.classList.add('selected');
 | 
					      menu.querySelector(`.item[data-value="${selectedUserId}"]`)?.classList.add('selected');
 | 
				
			||||||
    }, 0);
 | 
					    }, 0);
 | 
				
			||||||
  };
 | 
					  };
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user