Merge branch 'pr/5615' into 2.0

This commit is contained in:
Brandy Carney
2016-02-25 18:37:06 -05:00
2 changed files with 11 additions and 3 deletions

View File

@ -119,7 +119,7 @@ ion-searchbar {
// Searchbar Focused
// -----------------------------------------
.searchbar-focused {
.searchbar-focused:not(.searchbar-hide-cancel) {
.searchbar-search-icon {
display: none;
}

View File

@ -39,7 +39,12 @@ export class SearchbarInput {
*
* @usage
* ```html
* <ion-searchbar [(ngModel)]="defaultSearch" (input)="triggerInput($event)" (cancel)="onCancelSearchbar($event)" (clear)="onClearSearchbar($event)"></ion-searchbar>
* <ion-searchbar
* [(ngModel)]="myInput"
* [hideCancelButton]="shouldHideCancel"
* (input)="onInput($event)"
* (cancel)="onCancel($event)">
* </ion-searchbar>
* ```
*
* @demo /docs/v2/demos/searchbar/
@ -47,9 +52,12 @@ export class SearchbarInput {
*/
@Component({
selector: 'ion-searchbar',
host: {
'[class.searchbar-hide-cancel]': 'hideCancelButton'
},
template:
'<div class="searchbar-input-container">' +
'<button (click)="cancelSearchbar()" (mousedown)="cancelSearchbar()" clear dark class="searchbar-md-cancel">' +
'<button (click)="cancelSearchbar()" (mousedown)="cancelSearchbar()" [hidden]="hideCancelButton" clear dark class="searchbar-md-cancel">' +
'<ion-icon name="arrow-back"></ion-icon>' +
'</button>' +
'<div class="searchbar-search-icon"></div>' +