Commit 16e3fe3f authored by Clement Ho's avatar Clement Ho

Fix missing method from refactoring

parent 8925c960
......@@ -41,13 +41,20 @@
const tag = selected.querySelector('.js-filter-tag').innerText.trim();
if (tag.length) {
gl.FilteredSearchDropdownManager.addWordToInput(this.getSelectedText(token));
gl.FilteredSearchDropdownManager.addWordToInput(this.getSelectedTextWithoutEscaping(token));
}
this.dismissDropdown();
this.dispatchInputEvent();
}
}
getSelectedTextWithoutEscaping(selectedToken) {
const lastWord = this.input.value.split(' ').last();
const lastWordIndex = selectedToken.indexOf(lastWord);
return lastWordIndex === -1 ? selectedToken : selectedToken.slice(lastWord.length);
}
renderContent() {
this.droplab.changeHookList(this.hookId, this.dropdown, [droplabFilter], this.config);
this.droplab.setData(this.hookId, dropdownData);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment