fix(input, select, textarea): change type of placeholder prop to string only (#23500)

resolves #22976

BREAKING CHANGE: Updated the `placeholder` property on `ion-input`, `ion-textarea`, and `ion-select` to have a type of `string | undefined`.
This commit is contained in:
William Martin
2021-06-24 10:23:19 -04:00
committed by GitHub
parent ceabba154c
commit f3ae4319bb
9 changed files with 34 additions and 19 deletions

View File

@ -112,7 +112,7 @@ export class Textarea implements ComponentInterface {
/**
* Instructional text that shows before the input has a value.
*/
@Prop() placeholder?: string | null;
@Prop() placeholder?: string;
/**
* If `true`, the user cannot modify the value.
@ -271,7 +271,7 @@ export class Textarea implements ComponentInterface {
'textarea': true,
'input': true,
'interactive-disabled': this.disabled,
'has-placeholder': this.placeholder != null,
'has-placeholder': this.placeholder !== undefined,
'has-value': this.hasValue(),
'has-focus': this.hasFocus
});