Skip to content

Commit

Permalink
refactor(searchbar): set inputmode default to undefined (#20080)
Browse files Browse the repository at this point in the history
fixes #20074

BREAKING CHANGE: The `inputmode` property for `ion-searchbar` now defaults to `undefined`. To get the old behavior, set the `inputmode` property to `"search"`.
  • Loading branch information
liamdebeasi committed Dec 16, 2019
1 parent 1cabb53 commit 6612604
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 26 deletions.
2 changes: 1 addition & 1 deletion core/api.txt
Expand Up @@ -955,7 +955,7 @@ ion-searchbar,prop,clearIcon,string | undefined,undefined,false,false
ion-searchbar,prop,color,string | undefined,undefined,false,false
ion-searchbar,prop,debounce,number,250,false,false
ion-searchbar,prop,disabled,boolean,false,false,false
ion-searchbar,prop,inputmode,"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url",'search',false,false
ion-searchbar,prop,inputmode,"decimal" | "email" | "none" | "numeric" | "search" | "tel" | "text" | "url" | undefined,undefined,false,false
ion-searchbar,prop,mode,"ios" | "md",undefined,false,false
ion-searchbar,prop,placeholder,string,'Search',false,false
ion-searchbar,prop,searchIcon,string | undefined,undefined,false,false
Expand Down
2 changes: 1 addition & 1 deletion core/src/components.d.ts
Expand Up @@ -2179,7 +2179,7 @@ export namespace Components {
/**
* A hint to the browser for which keyboard to display. Possible values: `"none"`, `"text"`, `"tel"`, `"url"`, `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
*/
'inputmode': 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
'inputmode'?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
/**
* The mode determines which platform styles to use.
*/
Expand Down
47 changes: 28 additions & 19 deletions core/src/components/searchbar/readme.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/src/components/searchbar/searchbar.tsx
Expand Up @@ -87,7 +87,7 @@ export class Searchbar implements ComponentInterface {
* Possible values: `"none"`, `"text"`, `"tel"`, `"url"`,
* `"email"`, `"numeric"`, `"decimal"`, and `"search"`.
*/
@Prop() inputmode: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search' = 'search';
@Prop() inputmode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';

/**
* Set the input's placeholder.
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/searchbar/usage/angular.md
Expand Up @@ -42,4 +42,4 @@
<ion-toolbar>
<ion-searchbar></ion-searchbar>
</ion-toolbar>
```
```
2 changes: 1 addition & 1 deletion core/src/components/searchbar/usage/javascript.md
Expand Up @@ -42,4 +42,4 @@
<ion-toolbar>
<ion-searchbar></ion-searchbar>
</ion-toolbar>
```
```
2 changes: 1 addition & 1 deletion core/src/components/searchbar/usage/react.md
Expand Up @@ -49,4 +49,4 @@ export const SearchbarExample: React.FC = () => (
</IonToolbar>
</IonContent>
);
```
```
2 changes: 1 addition & 1 deletion core/src/components/searchbar/usage/vue.md
Expand Up @@ -44,4 +44,4 @@
<ion-searchbar></ion-searchbar>
</ion-toolbar>
</template>
```
```

0 comments on commit 6612604

Please sign in to comment.