Skip to content

Commit

Permalink
fix(searchbar): animated + no cancel works as expected
Browse files Browse the repository at this point in the history
fixes #8903
  • Loading branch information
manucorporat committed Nov 30, 2016
1 parent ccb6bf1 commit 851187a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/searchbar/searchbar.ios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ $searchbar-ios-toolbar-input-background: rgba(0, 0, 0, .08) !default;
// Searchbar animation
// -----------------------------------------

.searchbar-ios.searchbar-animated.searchbar-show-cancel .searchbar-ios-cancel {
display: block;
}
.searchbar-ios.searchbar-animated .searchbar-search-icon,
.searchbar-ios.searchbar-animated .searchbar-input {
transition: $searchbar-ios-input-transition;
Expand All @@ -222,8 +225,6 @@ $searchbar-ios-toolbar-input-background: rgba(0, 0, 0, .08) !default;
}

.searchbar-animated .searchbar-ios-cancel {
display: block;

margin-right: -100%;

opacity: 0;
Expand Down
3 changes: 3 additions & 0 deletions src/components/searchbar/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ <h5 padding-left> Search - Mode MD</h5>
<h5 padding-left> Search - Mode WP</h5>
<ion-searchbar mode="wp" animated="true" showCancelButton placeholder="Search"></ion-searchbar>

<h5 padding-left> Search - Animated and No Cancel</h5>
<ion-searchbar [placeholder]="'Search'" [animated]="true" [showCancelButton]="false"></ion-searchbar>

<p padding>
<button ion-button block (click)="changeValue()">Change Value</button>
</p>
Expand Down

0 comments on commit 851187a

Please sign in to comment.