mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-17 10:41:13 +08:00
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:
@ -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
|
||||
});
|
||||
|
Reference in New Issue
Block a user