refactor(searchbar): autocapitalize defaults to off (#29107)
BREAKING CHANGE: The `autocapitalize` property on Searchbar now defaults to `'off'`.
This commit is contained in:
parent
44529f0a62
commit
6e477b743e
|
@ -30,6 +30,7 @@ This is a comprehensive list of the breaking changes introduced in the major ver
|
|||
- [Progress bar](#version-8x-progress-bar)
|
||||
- [Radio](#version-8x-radio)
|
||||
- [Range](#version-8x-range)
|
||||
- [Searchbar](#version-8x-searchbar)
|
||||
- [Select](#version-8x-select)
|
||||
- [Textarea](#version-8x-textarea)
|
||||
- [Toggle](#version-8x-toggle)
|
||||
|
@ -264,6 +265,10 @@ For more information on styling toast buttons, refer to the [Toast Theming docum
|
|||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-range` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy range syntax, refer to the [Range documentation](https://ionicframework.com/docs/api/range#migrating-from-legacy-range-syntax).
|
||||
|
||||
<h4 id="version-8x-searchbar">Searchbar</h4>
|
||||
|
||||
- The `autocapitalize` property now defaults to `'off'`.
|
||||
|
||||
<h4 id="version-8x-select">Select</h4>
|
||||
|
||||
- The `legacy` property and support for the legacy syntax, which involved placing an `ion-select` inside of an `ion-item` with an `ion-label`, have been removed. Ionic will also no longer attempt to automatically associate form controls with sibling `<label>` elements as these label elements are now used inside the form control. Developers should provide a label (either visible text or `aria-label`) directly to the form control. For more information on migrating from the legacy select syntax, refer to the [Select documentation](https://ionicframework.com/docs/api/select#migrating-from-legacy-select-syntax).
|
||||
|
|
|
@ -1166,7 +1166,7 @@ ion-row,shadow
|
|||
|
||||
ion-searchbar,scoped
|
||||
ion-searchbar,prop,animated,boolean,false,false,false
|
||||
ion-searchbar,prop,autocapitalize,string,undefined,true,false
|
||||
ion-searchbar,prop,autocapitalize,string,'off',false,false
|
||||
ion-searchbar,prop,autocomplete,"name" | "email" | "tel" | "url" | "on" | "off" | "honorific-prefix" | "given-name" | "additional-name" | "family-name" | "honorific-suffix" | "nickname" | "username" | "new-password" | "current-password" | "one-time-code" | "organization-title" | "organization" | "street-address" | "address-line1" | "address-line2" | "address-line3" | "address-level4" | "address-level3" | "address-level2" | "address-level1" | "country" | "country-name" | "postal-code" | "cc-name" | "cc-given-name" | "cc-additional-name" | "cc-family-name" | "cc-number" | "cc-exp" | "cc-exp-month" | "cc-exp-year" | "cc-csc" | "cc-type" | "transaction-currency" | "transaction-amount" | "language" | "bday" | "bday-day" | "bday-month" | "bday-year" | "sex" | "tel-country-code" | "tel-national" | "tel-area-code" | "tel-local" | "tel-extension" | "impp" | "photo",'off',false,false
|
||||
ion-searchbar,prop,autocorrect,"off" | "on",'off',false,false
|
||||
ion-searchbar,prop,cancelButtonIcon,string,config.get('backButtonIcon', arrowBackSharp) as string,false,false
|
||||
|
|
|
@ -7213,7 +7213,7 @@ declare namespace LocalJSX {
|
|||
/**
|
||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user. Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||
*/
|
||||
"autocapitalize": string;
|
||||
"autocapitalize"?: string;
|
||||
/**
|
||||
* Set the input's autocomplete property.
|
||||
*/
|
||||
|
|
|
@ -78,26 +78,11 @@ export class Searchbar implements ComponentInterface {
|
|||
*/
|
||||
@Prop() animated = false;
|
||||
|
||||
/**
|
||||
* Prior to the addition of this property
|
||||
* autocapitalize was enabled by default on iOS
|
||||
* and disabled by default on Android
|
||||
* for Searchbar. The autocapitalize type on HTMLElement
|
||||
* requires that it be a string and never undefined.
|
||||
* However, setting it to a string value would be a breaking change
|
||||
* in behavior, so we use "!" to tell TypeScript that this property
|
||||
* is always defined so we can rely on the browser defaults. Browsers
|
||||
* will automatically set a default value if the developer does not set one.
|
||||
*
|
||||
* In the future, this property will default to "off" to align with
|
||||
* Input and Textarea, and the "!" will not be needed.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Indicates whether and how the text value should be automatically capitalized as it is entered/edited by the user.
|
||||
* Available options: `"off"`, `"none"`, `"on"`, `"sentences"`, `"words"`, `"characters"`.
|
||||
*/
|
||||
@Prop() autocapitalize!: string;
|
||||
@Prop() autocapitalize: string = 'off';
|
||||
|
||||
/**
|
||||
* Set the input's autocomplete property.
|
||||
|
|
Loading…
Reference in New Issue