clay-autocomplete
Advanced tools
Comparing version 2.11.0 to 2.11.1
@@ -145,3 +145,3 @@ 'use strict'; | ||
value: function _handleDropdownItemClick(event) { | ||
return this._handleItemSelected(event); | ||
return this._handleItemSelected(event, event.delegateTarget.getAttribute('data-dropdown-item-index')); | ||
} | ||
@@ -152,2 +152,3 @@ | ||
* @param {!Event} event | ||
* @param {!string} index | ||
* @protected | ||
@@ -159,4 +160,3 @@ * @return {Boolean} If the event has been prevented or not. | ||
key: '_handleItemSelected', | ||
value: function _handleItemSelected(event) { | ||
var index = event.delegateTarget.getAttribute('data-dropdown-item-index'); | ||
value: function _handleItemSelected(event, index) { | ||
var item = this.filteredItems[Number(index)]; | ||
@@ -247,3 +247,3 @@ | ||
if (this.filteredItems.length && event.delegateTarget.tagName !== 'INPUT') { | ||
this._handleItemSelected(event); | ||
this._handleItemSelected(event, event.target.getAttribute('data-dropdown-item-index')); | ||
} | ||
@@ -446,3 +446,3 @@ break; | ||
/** | ||
* Flag to enable the filtred items with autocomplete default. | ||
* Flag to enable the filtered items with autocomplete default. | ||
* @default true | ||
@@ -449,0 +449,0 @@ * @instance |
{ | ||
"name": "clay-autocomplete", | ||
"version": "2.11.0", | ||
"version": "2.11.1", | ||
"description": "Metal ClayAutocomplete component", | ||
@@ -30,4 +30,4 @@ "license": "BSD-3-Clause", | ||
"dependencies": { | ||
"clay-data-provider": "^2.11.0", | ||
"clay-portal": "^2.11.0", | ||
"clay-data-provider": "^2.11.1", | ||
"clay-portal": "^2.11.1", | ||
"metal": "^2.16.0", | ||
@@ -46,8 +46,8 @@ "metal-component": "^2.16.0", | ||
"babel-preset-env": "^1.6.0", | ||
"browserslist-config-clay": "^2.11.0", | ||
"clay-css": "^2.11.0", | ||
"browserslist-config-clay": "^2.11.1", | ||
"clay-css": "^2.11.1", | ||
"metal-dom": "^2.13.2", | ||
"metal-tools-soy": "^6.0.0", | ||
"webpack": "^3.0.0", | ||
"webpack-config-clay": "^2.11.0" | ||
"webpack-config-clay": "^2.11.1" | ||
}, | ||
@@ -57,3 +57,3 @@ "browserslist": [ | ||
], | ||
"gitHead": "4efc4d8d6c283c68abca85ecd0b2e5ab918f7429" | ||
"gitHead": "41a992bb5762fc7431cc3036c9390814a34713a3" | ||
} |
@@ -96,3 +96,6 @@ import 'clay-data-provider'; | ||
_handleDropdownItemClick(event) { | ||
return this._handleItemSelected(event); | ||
return this._handleItemSelected( | ||
event, | ||
event.delegateTarget.getAttribute('data-dropdown-item-index') | ||
); | ||
} | ||
@@ -103,9 +106,7 @@ | ||
* @param {!Event} event | ||
* @param {!string} index | ||
* @protected | ||
* @return {Boolean} If the event has been prevented or not. | ||
*/ | ||
_handleItemSelected(event) { | ||
const index = event.delegateTarget.getAttribute( | ||
'data-dropdown-item-index' | ||
); | ||
_handleItemSelected(event, index) { | ||
const item = this.filteredItems[Number(index)]; | ||
@@ -188,3 +189,6 @@ | ||
) { | ||
this._handleItemSelected(event); | ||
this._handleItemSelected( | ||
event, | ||
event.target.getAttribute('data-dropdown-item-index') | ||
); | ||
} | ||
@@ -392,3 +396,3 @@ break; | ||
/** | ||
* Flag to enable the filtred items with autocomplete default. | ||
* Flag to enable the filtered items with autocomplete default. | ||
* @default true | ||
@@ -395,0 +399,0 @@ * @instance |
Sorry, the diff of this file is not supported yet
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
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
181228
2274
Updatedclay-data-provider@^2.11.1
Updatedclay-portal@^2.11.1