input number format on bind #10404
Answered
by
nsbarsukov
vytautas-pranskunas-
asked this question in
Q&A
-
Hello i am using tuiInputNumber directive and it is working fine when user types. But is there a possibility to do formating on bind (when form gets filled / patched from the server) |
Beta Was this translation helpful? Give feedback.
Answered by
nsbarsukov
Feb 18, 2025
Replies: 1 comment 18 replies
-
Hello! Just patch control value with new number - it will be formatted automatically: protected control = new FormControl(0.42);
// [...]
constructor() {
this.serverRequest$.subscribe((x) => {
this.control.patchValue(x);
});
} |
Beta Was this translation helpful? Give feedback.
18 replies
Answer selected by
nsbarsukov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello!
Just patch control value with new number - it will be formatted automatically:
https://stackblitz.com/edit/input-number-patch-control-value?file=src%2Fapp%2Fapp.template.html,src%2Fapp%2Fapp.component.ts