naming change

This commit is contained in:
Bohdan Kostko 2017-03-12 14:21:00 +01:00
parent 9df1310a52
commit c33a89501a
2 changed files with 4 additions and 4 deletions

View file

@ -25,7 +25,7 @@ import {
sortByAlpha, sortByAlpha,
sortByScore, sortByScore,
triggerEvent, triggerEvent,
findAncestorByAttr findAncestorByAttrName
} }
from './lib/utils.js'; from './lib/utils.js';
import './lib/polyfills.js'; import './lib/polyfills.js';
@ -1580,9 +1580,9 @@ class Choices {
const activeItems = this.store.getItemsFilteredByActive(); const activeItems = this.store.getItemsFilteredByActive();
const hasShiftKey = e.shiftKey; const hasShiftKey = e.shiftKey;
if (foundTarget = findAncestorByAttr(target, 'data-item')) { if (foundTarget = findAncestorByAttrName(target, 'data-item')) {
this._handleItemAction(activeItems, foundTarget, hasShiftKey); this._handleItemAction(activeItems, foundTarget, hasShiftKey);
} else if (foundTarget = findAncestorByAttr(target, 'data-choice')) { } else if (foundTarget = findAncestorByAttrName(target, 'data-choice')) {
this._handleChoiceAction(activeItems, foundTarget); this._handleChoiceAction(activeItems, foundTarget);
} }

View file

@ -264,7 +264,7 @@ export const findAncestor = function(el, cls) {
* @param {string} attr Attribute name of parent * @param {string} attr Attribute name of parent
* @return {?NodeElement} Found parent element or null * @return {?NodeElement} Found parent element or null
*/ */
export const findAncestorByAttr = function(el, attr) { export const findAncestorByAttrName = function(el, attr) {
let target = el; let target = el;
while (target) { while (target) {