Fix not render emoji in filter dropdown
This commit is contained in:
parent
7528b2d260
commit
428b220a1f
2 changed files with 12 additions and 4 deletions
|
@ -69,10 +69,13 @@ export default class DropdownEmoji extends FilteredSearchDropdown {
|
|||
// Replace empty gl-emoji tag to real content
|
||||
const dropdownItems = [...this.dropdown.querySelectorAll('.filter-dropdown-item')];
|
||||
dropdownItems.forEach(dropdownItem => {
|
||||
const name = dropdownItem.querySelector('.js-data-value').innerText;
|
||||
const emojiTag = this.glEmojiTag(name);
|
||||
const emojiElement = dropdownItem.querySelector('gl-emoji');
|
||||
emojiElement.outerHTML = emojiTag;
|
||||
const valueElement = dropdownItem.querySelector('.js-data-value');
|
||||
if (valueElement !== null) {
|
||||
const name = valueElement.innerText;
|
||||
const emojiTag = this.glEmojiTag(name);
|
||||
const emojiElement = dropdownItem.querySelector('gl-emoji');
|
||||
emojiElement.outerHTML = emojiTag;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
5
changelogs/unreleased/fix-not-render-emoji.yml
Normal file
5
changelogs/unreleased/fix-not-render-emoji.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Fix not render emoji in filter dropdown
|
||||
merge_request: 23112
|
||||
author: Hiroyuki Sato
|
||||
type: fixed
|
Loading…
Reference in a new issue