Skip to content

Commit

Permalink
fix(search-box): back arrow clears search (closes #1157) (#1158)
Browse files Browse the repository at this point in the history
* fix(search-box): back arrow clears search

* fix(seach-box): actually clear the input
  • Loading branch information
JulieMarie authored and emoralesb05 committed May 28, 2018
1 parent 79b8dc4 commit 5fe2e77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/platform/core/search/search-box/search-box.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ export class TdSearchBoxComponent extends _TdSearchBoxMixinBase implements ICont
* Method executed when the search icon is clicked.
*/
searchClicked(): void {
if (this.alwaysVisible || !this._searchVisible) {
if (!this.alwaysVisible && this._searchVisible) {
this.value = '';
this.handleClear();
} else if (this.alwaysVisible || !this._searchVisible) {
this._searchInput.focus();
}
this.toggleVisibility();
Expand Down

0 comments on commit 5fe2e77

Please sign in to comment.