From a028c3b39873d8a1eb544fc2e618a41aa2f75cac Mon Sep 17 00:00:00 2001 From: Konstantinos Norgias Date: Tue, 9 Nov 2021 17:44:56 +0100 Subject: [PATCH] chore: rename method more accurately --- packages/combobox/src/LionCombobox.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/combobox/src/LionCombobox.js b/packages/combobox/src/LionCombobox.js index 9fa06d389..60b333271 100644 --- a/packages/combobox/src/LionCombobox.js +++ b/packages/combobox/src/LionCombobox.js @@ -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) {