chore: rename method more accurately

This commit is contained in:
Konstantinos Norgias 2021-11-09 17:44:56 +01:00
parent 26f08ccbc7
commit a028c3b398

View file

@ -8,9 +8,9 @@ const matchA11ySpanReverseFns = new WeakMap();
/**
* @param {Node} root
* @param {string} matchingString
* @param {object} option
* @param {Node} option
*/
function checkForTextMatch(root, matchingString, option) {
function makeMatchingTextBold(root, matchingString, option) {
Array.from(root.childNodes).forEach(childNode => {
if (childNode.nodeName === '#text') {
// check for match based on nodeValue
@ -51,7 +51,7 @@ function checkForTextMatch(root, matchingString, option) {
});
}
} else {
checkForTextMatch(childNode, matchingString, option);
makeMatchingTextBold(childNode, matchingString, option);
}
});
}
@ -637,7 +637,7 @@ export class LionCombobox extends OverlayMixin(LionListbox) {
*/
// eslint-disable-next-line class-methods-use-this
_onFilterMatch(option, matchingString) {
checkForTextMatch(option, matchingString, option);
makeMatchingTextBold(option, matchingString, option);
// For Safari, we need to add a label to the element
if (option.textContent) {