Skip to content

Commit

Permalink
fix(components/input): remove setvalue #1190
Browse files Browse the repository at this point in the history
  • Loading branch information
ZurabDev committed Jun 10, 2024
1 parent 8caf3f8 commit 8240100
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ import {
Output,
Self,
} from '@angular/core';
import { NgControl, NgModel, UntypedFormControl, Validators } from '@angular/forms';
import { NgControl, NgModel, Validators } from '@angular/forms';
import { PrizmDestroyService } from '@prizm-ui/helpers';
import { takeUntil, tap } from 'rxjs/operators';
import { PrizmInputControl } from '../common/base/input-control.class';
import { PrizmInputHintDirective, PrizmInputLayoutComponent } from '../common';
import { NgxMaskDirective } from 'ngx-mask';
import { timer } from 'rxjs';

@Component({
selector:
Expand Down Expand Up @@ -274,7 +273,6 @@ export class PrizmInputTextComponent<VALUE extends string | number | null = stri
}

private updateValue(value: VALUE): void {
if (value !== this.ngControl?.value) this.ngControl?.control?.setValue(value);
if (value !== this.value) this._inputValue.value = value as string;
this.inputHint?.updateHint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Output,
Self,
} from '@angular/core';
import { NgControl, NgModel, UntypedFormControl, Validators } from '@angular/forms';
import { NgControl, NgModel, Validators } from '@angular/forms';
import { PrizmDestroyService } from '@prizm-ui/helpers';
import { takeUntil, tap } from 'rxjs/operators';
import { PrizmInputControl } from '../common/base/input-control.class';
Expand Down Expand Up @@ -269,7 +269,6 @@ export class PrizmInputTextComponent<VALUE extends string | number | null = stri
}

private updateValue(value: VALUE): void {
if (value !== this.ngControl?.value) this.ngControl?.control?.setValue(value);
if (value !== this.value) this._inputValue.value = value as string;
this.inputHint?.updateHint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
Output,
Self,
} from '@angular/core';
import { NgControl, NgModel, UntypedFormControl, Validators } from '@angular/forms';
import { NgControl, NgModel, Validators } from '@angular/forms';
import { PrizmDestroyService } from '@prizm-ui/helpers';
import { takeUntil, tap } from 'rxjs/operators';
import { PrizmInputControl } from '../common/base/input-control.class';
Expand Down Expand Up @@ -268,7 +268,6 @@ export class PrizmInputTextComponent<VALUE extends string | number | null = stri
}

private updateValue(value: VALUE): void {
if (value !== this.ngControl?.value) this.ngControl?.control?.setValue(value);
if (value !== this.value) this._inputValue.value = value as string;
this.inputHint?.updateHint();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@ import {
Output,
Self,
} from '@angular/core';
import { NgControl, NgModel, UntypedFormControl, Validators } from '@angular/forms';
import { NgControl, NgModel, Validators } from '@angular/forms';
import { PrizmDestroyService } from '@prizm-ui/helpers';
import { takeUntil, tap } from 'rxjs/operators';
import { PrizmInputControl } from '../common/base/input-control.class';
import { PrizmInputHintDirective, PrizmInputLayoutComponent } from '../common';
import { NgxMaskDirective } from 'ngx-mask';
import { timer } from 'rxjs';

@Component({
selector:
Expand Down Expand Up @@ -274,7 +273,6 @@ export class PrizmInputTextComponent<VALUE extends string | number | null = stri
}

private updateValue(value: VALUE): void {
if (value !== this.ngControl?.value) this.ngControl?.control?.setValue(value);
if (value !== this.value) this._inputValue.value = value as string;
this.inputHint?.updateHint();
}
Expand Down

0 comments on commit 8240100

Please sign in to comment.