chore: rename method more accurately
This commit is contained in:
parent
26f08ccbc7
commit
a028c3b398
1 changed files with 4 additions and 4 deletions
|
|
@ -8,9 +8,9 @@ const matchA11ySpanReverseFns = new WeakMap();
|
||||||
/**
|
/**
|
||||||
* @param {Node} root
|
* @param {Node} root
|
||||||
* @param {string} matchingString
|
* @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 => {
|
Array.from(root.childNodes).forEach(childNode => {
|
||||||
if (childNode.nodeName === '#text') {
|
if (childNode.nodeName === '#text') {
|
||||||
// check for match based on nodeValue
|
// check for match based on nodeValue
|
||||||
|
|
@ -51,7 +51,7 @@ function checkForTextMatch(root, matchingString, option) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} 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
|
// eslint-disable-next-line class-methods-use-this
|
||||||
_onFilterMatch(option, matchingString) {
|
_onFilterMatch(option, matchingString) {
|
||||||
checkForTextMatch(option, matchingString, option);
|
makeMatchingTextBold(option, matchingString, option);
|
||||||
|
|
||||||
// For Safari, we need to add a label to the element
|
// For Safari, we need to add a label to the element
|
||||||
if (option.textContent) {
|
if (option.textContent) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue