mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 03:32:21 +08:00
fix(label): placeholder + floating label (#16111)
* fix(label): placeholder + floating label * fix placeholder type * update docs * uodate docs
This commit is contained in:
@ -133,7 +133,7 @@ export class Input implements ComponentInterface {
|
||||
/**
|
||||
* Instructional text that shows before the input has a value.
|
||||
*/
|
||||
@Prop() placeholder?: string;
|
||||
@Prop() placeholder?: string | null;
|
||||
|
||||
/**
|
||||
* If `true`, the user cannot modify the value.
|
||||
@ -263,6 +263,7 @@ export class Input implements ComponentInterface {
|
||||
this.ionStyle.emit({
|
||||
'interactive': true,
|
||||
'input': true,
|
||||
'has-placeholder': this.placeholder != null,
|
||||
'has-value': this.hasValue(),
|
||||
'has-focus': this.hasFocus,
|
||||
'interactive-disabled': this.disabled,
|
||||
@ -355,7 +356,7 @@ export class Input implements ComponentInterface {
|
||||
multiple={this.multiple}
|
||||
name={this.name}
|
||||
pattern={this.pattern}
|
||||
placeholder={this.placeholder}
|
||||
placeholder={this.placeholder || ''}
|
||||
results={this.results}
|
||||
readOnly={this.readonly}
|
||||
required={this.required}
|
||||
|
Reference in New Issue
Block a user