@vaadin/vaadin-list-mixin
Advanced tools
Comparing version 2.3.1 to 2.4.0-alpha1
@@ -13,3 +13,3 @@ { | ||
"name": "@vaadin/vaadin-list-mixin", | ||
"version": "2.3.1", | ||
"version": "2.4.0-alpha1", | ||
"main": "vaadin-list-mixin.js", | ||
@@ -36,4 +36,7 @@ "author": "Vaadin Ltd", | ||
"wct-browser-legacy": "^1.0.1", | ||
"@webcomponents/webcomponentsjs": "^2.0.0" | ||
"@webcomponents/webcomponentsjs": "^2.0.0", | ||
"@vaadin/vaadin-context-menu": "^4.3.13", | ||
"@vaadin/vaadin-select": "^2.1.6", | ||
"@vaadin/vaadin-tabs": "^3.0.5" | ||
} | ||
} |
@@ -136,3 +136,3 @@ /** | ||
const increment = 1; | ||
const condition = item => !item.disabled && | ||
const condition = item => !(item.disabled || this._isItemHidden(item)) && | ||
item.textContent.replace(/[^a-zA-Z0-9]/g, '').toLowerCase().indexOf(this._searchBuf) === 0; | ||
@@ -166,15 +166,18 @@ | ||
const condition = item => !item.disabled; | ||
const condition = item => !(item.disabled || this._isItemHidden(item)); | ||
let idx, increment; | ||
const isRTL = !this._vertical && this.getAttribute('dir') === 'rtl'; | ||
const dirIncrement = isRTL ? -1 : 1; | ||
if (this._vertical && key === 'Up' || !this._vertical && key === 'Left') { | ||
increment = -1; | ||
idx = currentIdx - 1; | ||
increment = -dirIncrement; | ||
idx = currentIdx - dirIncrement; | ||
} else if (this._vertical && key === 'Down' || !this._vertical && key === 'Right') { | ||
increment = dirIncrement; | ||
idx = currentIdx + dirIncrement; | ||
} else if ((key === 'Home' && !isRTL) || (key === 'End' && isRTL)) { | ||
increment = 1; | ||
idx = currentIdx + 1; | ||
} else if (key === 'Home') { | ||
increment = 1; | ||
idx = 0; | ||
} else if (key === 'End') { | ||
} else if ((key === 'End' && !isRTL) || (key === 'Home' && isRTL)) { | ||
increment = -1; | ||
@@ -201,2 +204,3 @@ idx = this.items.length - 1; | ||
const item = this.items[idx]; | ||
if (condition(item)) { | ||
@@ -209,2 +213,6 @@ return idx; | ||
_isItemHidden(item) { | ||
return getComputedStyle(item).display === 'none'; | ||
} | ||
_setFocusable(idx) { | ||
@@ -211,0 +219,0 @@ idx = this._getAvailableIndex(idx, 1, item => !item.disabled); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24868
331
6
1