mirror of
https://github.com/Choices-js/Choices.git
synced 2024-05-10 17:46:35 +02:00
naming change
This commit is contained in:
parent
9df1310a52
commit
c33a89501a
|
@ -25,7 +25,7 @@ import {
|
|||
sortByAlpha,
|
||||
sortByScore,
|
||||
triggerEvent,
|
||||
findAncestorByAttr
|
||||
findAncestorByAttrName
|
||||
}
|
||||
from './lib/utils.js';
|
||||
import './lib/polyfills.js';
|
||||
|
@ -1580,9 +1580,9 @@ class Choices {
|
|||
const activeItems = this.store.getItemsFilteredByActive();
|
||||
const hasShiftKey = e.shiftKey;
|
||||
|
||||
if (foundTarget = findAncestorByAttr(target, 'data-item')) {
|
||||
if (foundTarget = findAncestorByAttrName(target, 'data-item')) {
|
||||
this._handleItemAction(activeItems, foundTarget, hasShiftKey);
|
||||
} else if (foundTarget = findAncestorByAttr(target, 'data-choice')) {
|
||||
} else if (foundTarget = findAncestorByAttrName(target, 'data-choice')) {
|
||||
this._handleChoiceAction(activeItems, foundTarget);
|
||||
}
|
||||
|
||||
|
|
|
@ -264,7 +264,7 @@ export const findAncestor = function(el, cls) {
|
|||
* @param {string} attr Attribute name of parent
|
||||
* @return {?NodeElement} Found parent element or null
|
||||
*/
|
||||
export const findAncestorByAttr = function(el, attr) {
|
||||
export const findAncestorByAttrName = function(el, attr) {
|
||||
let target = el;
|
||||
|
||||
while (target) {
|
||||
|
|
Loading…
Reference in a new issue