Skip to content

Commit

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

* 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 48af6e3 commit d9593f2
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 d9593f2

Please sign in to comment.