Skip to content

Commit

Permalink
Merge pull request #1396 from matuzalemsteles/issue-1393
Browse files Browse the repository at this point in the history
Fixes #1393 - Replace itemSelected in favor of itemClicked
  • Loading branch information
carloslancha authored Dec 17, 2018
2 parents 0bf54e8 + 3e409a8 commit 80c5759
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 49 deletions.
14 changes: 0 additions & 14 deletions packages/clay-dropdown/src/ClayActionsDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ class ClayActionsDropdown extends ClayComponent {
});
}

/**
* Continues the propagation of the item clicked event
* @param {!Event} event
* @protected
* @return {Boolean} If the event has been prevented or not.
*/
_handleItemSelected(event) {
return !this.emit({
data: event.data,
name: 'itemSelected',
originalEvent: event,
});
}

/**
* Continues the propagation of the toggle event.
* @param {!Event} event
Expand Down
2 changes: 0 additions & 2 deletions packages/clay-dropdown/src/ClayActionsDropdown.soy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{@param spritemap: string}
{@param? _handleButtonClick: any}
{@param? _handleItemClick: any}
{@param? _handleItemSelected: any}
{@param? button: ?}
{@param? caption: string}
{@param? disabled: bool}
Expand Down Expand Up @@ -43,7 +42,6 @@
{param events: [
'buttonClicked': $_handleButtonClick,
'itemClicked': $_handleItemClick,
'itemSelected': $_handleItemSelected,
'toggle': $toggle
]/}
{param expanded: $expanded /}
Expand Down
14 changes: 0 additions & 14 deletions packages/clay-dropdown/src/ClayCreationMenuDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ class ClayCreationMenuDropdown extends ClayComponent {
});
}

/**
* Continues the propagation of the enter key event
* @param {!Event} event
* @protected
* @return {Boolean} If the event has been prevented or not.
*/
_handleItemSelected(event) {
return !this.emit({
data: event.data,
name: 'itemSelected',
originalEvent: event,
});
}

/**
* Continues the propagation of the toggle event.
* @param {!Event} event
Expand Down
2 changes: 0 additions & 2 deletions packages/clay-dropdown/src/ClayCreationMenuDropdown.soy
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
{@param spritemap: string}
{@param? _handleButtonClick: any}
{@param? _handleItemClick: any}
{@param? _handleItemSelected: any}
{@param? disabled: bool}
{@param? elementClasses: string}
{@param? expanded: bool}
Expand Down Expand Up @@ -207,7 +206,6 @@
{param events: [
'buttonClicked': $_handleButtonClick,
'itemClicked': $_handleItemClick,
'itemSelected': $_handleItemSelected,
'toggle': $toggle
] /}
{param expanded: $expanded /}
Expand Down
14 changes: 0 additions & 14 deletions packages/clay-dropdown/src/ClayDropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,6 @@ class ClayDropdown extends ClayComponent {
});
}

/**
* Continues the propagation of the enter key event
* @param {!Event} event
* @protected
* @return {Boolean} If the event has been prevented or not.
*/
_handleItemSelected(event) {
return !this.emit({
data: event.data,
name: 'itemSelected',
originalEvent: event,
});
}

/**
* Continues the propagation of the toggle event.
* @param {!Event} event
Expand Down
2 changes: 0 additions & 2 deletions packages/clay-dropdown/src/ClayDropdown.soy
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
{@param spritemap: string}
{@param? _handleButtonClick: any}
{@param? _handleItemClick: any}
{@param? _handleItemSelected: any}
{@param? button: ?}
{@param? disabled: bool}
{@param? elementClasses: string}
Expand Down Expand Up @@ -54,7 +53,6 @@
{param events: [
'buttonClicked': $_handleButtonClick,
'itemClicked': $_handleItemClick,
'itemSelected': $_handleItemSelected,
'toggle': $toggle
]/}
{param expanded: $expanded /}
Expand Down
2 changes: 1 addition & 1 deletion packages/clay-dropdown/src/ClayDropdownBase.js
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ class ClayDropdownBase extends ClayComponent {
data: {
item: flatten(this.items).find(item => item.active),
},
name: 'itemSelected',
name: 'itemClicked',
originalEvent: event,
});
}
Expand Down

0 comments on commit 80c5759

Please sign in to comment.