mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-20 20:33:32 +08:00
Merge branch 'pr/5615' into 2.0
This commit is contained in:
@ -119,7 +119,7 @@ ion-searchbar {
|
|||||||
// Searchbar Focused
|
// Searchbar Focused
|
||||||
// -----------------------------------------
|
// -----------------------------------------
|
||||||
|
|
||||||
.searchbar-focused {
|
.searchbar-focused:not(.searchbar-hide-cancel) {
|
||||||
.searchbar-search-icon {
|
.searchbar-search-icon {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,12 @@ export class SearchbarInput {
|
|||||||
*
|
*
|
||||||
* @usage
|
* @usage
|
||||||
* ```html
|
* ```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/
|
* @demo /docs/v2/demos/searchbar/
|
||||||
@ -47,9 +52,12 @@ export class SearchbarInput {
|
|||||||
*/
|
*/
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ion-searchbar',
|
selector: 'ion-searchbar',
|
||||||
|
host: {
|
||||||
|
'[class.searchbar-hide-cancel]': 'hideCancelButton'
|
||||||
|
},
|
||||||
template:
|
template:
|
||||||
'<div class="searchbar-input-container">' +
|
'<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>' +
|
'<ion-icon name="arrow-back"></ion-icon>' +
|
||||||
'</button>' +
|
'</button>' +
|
||||||
'<div class="searchbar-search-icon"></div>' +
|
'<div class="searchbar-search-icon"></div>' +
|
||||||
|
Reference in New Issue
Block a user