Skip to content

Commit

Permalink
fix(searchbar): positionElements to assign input mode fixes #8855
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonornela committed Oct 22, 2016
1 parent 5f3aedc commit cd0e19a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/searchbar/searchbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ export class Searchbar extends Ion {
let shouldAlignLeft = (!isAnimated || (this._value && this._value.toString().trim() !== '') || this._sbHasFocus === true);
this._shouldAlignLeft = shouldAlignLeft;

if (this._config.get('mode') !== 'ios') {
if (this._mode !== 'ios') {
return;
}

Expand Down
6 changes: 6 additions & 0 deletions src/components/searchbar/test/basic/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ <h5 padding-left> Search - Custom Cancel Button Danger </h5>
<h5 padding-left> Search - Value passed </h5>
<ion-searchbar value="mysearch" showCancelButton (ionInput)="triggerInput($event)" (ionCancel)="onCancelSearchbar($event)" (ionClear)="onClearSearchbar($event)" cancelButtonText="Really Long Cancel" color="dark"></ion-searchbar>

<h5 padding-left> Search - Mode iOS passed </h5>
<ion-searchbar mode="ios" animated="true" showCancelButton placeholder="Search"></ion-searchbar>

<h5 padding-left> Search - Mode MD passed </h5>
<ion-searchbar mode="md" animated="true" showCancelButton placeholder="Search"></ion-searchbar>

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

0 comments on commit cd0e19a

Please sign in to comment.