Skip to content

Commit

Permalink
Merge pull request #622 from dxc-technology/passwordFix
Browse files Browse the repository at this point in the history
[Patch] Fixing password uncontrolled event
  • Loading branch information
mawelCaballero committed Jan 26, 2022
2 parents 87dbbe1 + 3358334 commit 1864d58
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
}
Expand Down

0 comments on commit 1864d58

Please sign in to comment.