mirror of
https://github.com/Choices-js/Choices.git
synced 2024-06-15 20:25:18 +02:00
naming change
This commit is contained in:
parent
9df1310a52
commit
c33a89501a
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue