From 335833416ea0bb12ab45399f9368b707f55fcc05 Mon Sep 17 00:00:00 2001 From: Jialecl Date: Tue, 25 Jan 2022 17:00:00 +0100 Subject: [PATCH] [Patch] Fixing password uncontrolled event --- .../dxc-password-input.component.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/projects/dxc-ngx-cdk/src/lib/dxc-password-input/dxc-password-input.component.ts b/projects/dxc-ngx-cdk/src/lib/dxc-password-input/dxc-password-input.component.ts index 36ba663fd..df4aa72b1 100644 --- a/projects/dxc-ngx-cdk/src/lib/dxc-password-input/dxc-password-input.component.ts +++ b/projects/dxc-ngx-cdk/src/lib/dxc-password-input/dxc-password-input.component.ts @@ -141,18 +141,18 @@ export class DxcPasswordInputComponent implements OnInit, OnChanges { } - handleOnChange(event) { + handleOnChange({value, error}) { this.cdRef.detectChanges(); - this.onChange.emit(event); + this.onChange.emit({value, error}); this.controlled ? (this.dxcInputRef.inputRef.nativeElement.value = this.value) - : (this.value = event); + : (this.value = value); } - handleOnBlur(event) { - this.onBlur.emit({ value: event.value, error: event.error }); + handleOnBlur({value, error}) { + this.onBlur.emit({ value: value, error: error }); if (!this.controlled) { - this.value = event.value; + this.value = value; this.cdRef.detectChanges(); } }