Currently, I am facing an issue where the form input fields are not being populated with data from the model that needs to be edited. While the text input fields function correctly, the number fields remain empty until I click on them, and in some cases, they only update after clicking on all previous number fields. Here is the HTML code snippet:
<form [formGroup]="servis.editCarFrom" style="width: 320px;">
<div class="form">
[...]
</div>
</form>
In addition, here is the section of code responsible for setting the control values:
InitEditCarForm(kola: any) {
let naziv = kola.naziv.split('-');
let marka = naziv[0];
let model = naziv[1];
let tip = TipVozila[kola.tipVozila];
[...]
this.editCarForm.markAllAsTouched();
}
Despite this implementation, I am noticing a delay in updating the values on the page, and not all fields are getting updated as expected. Is there a more efficient approach to handling this? If not, how can I ensure that the number fields display their correct values automatically once the page has finished loading?