mirror of
https://github.com/home-assistant/frontend.git
synced 2025-07-27 19:26:36 +00:00
Forward change event in password field (#22377)
This commit is contained in:
parent
fca97cd734
commit
e31af5d31b
@ -118,6 +118,7 @@ export class HaPasswordField extends LitElement {
|
|||||||
.type=${this._unmaskedPassword ? "text" : "password"}
|
.type=${this._unmaskedPassword ? "text" : "password"}
|
||||||
.suffix=${html`<div style="width: 24px"></div>`}
|
.suffix=${html`<div style="width: 24px"></div>`}
|
||||||
@input=${this._handleInputChange}
|
@input=${this._handleInputChange}
|
||||||
|
@change=${this._reDispatchEvent}
|
||||||
></ha-textfield>
|
></ha-textfield>
|
||||||
<ha-icon-button
|
<ha-icon-button
|
||||||
toggles
|
toggles
|
||||||
@ -156,6 +157,12 @@ export class HaPasswordField extends LitElement {
|
|||||||
this.value = ev.target.value;
|
this.value = ev.target.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@eventOptions({ passive: true })
|
||||||
|
private _reDispatchEvent(oldEvent: Event) {
|
||||||
|
const newEvent = new Event(oldEvent.type, oldEvent);
|
||||||
|
this.dispatchEvent(newEvent);
|
||||||
|
}
|
||||||
|
|
||||||
static styles = css`
|
static styles = css`
|
||||||
:host {
|
:host {
|
||||||
display: block;
|
display: block;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user