瀏覽代碼

Make a distinction between `active` and `selected` in the issue author dropdown (#30207)

Signed-off-by: Yarden Shoham <git@yardenshoham.com>
tags/v1.22.0-rc1
Yarden Shoham 2 月之前
父節點
當前提交
f8fbaaf26f
No account linked to committer's email address
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      web_src/js/features/repo-issue-list.js

+ 3
- 1
web_src/js/features/repo-issue-list.js 查看文件

@@ -149,7 +149,9 @@ function initRepoIssueListAuthorDropdown() {
$searchDropdown.dropdown('refresh');
// defer our selection to the next tick, because dropdown will set the selection item after this `menu` function
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');
}, 0);
};

Loading…
取消
儲存