Posted 31 January 2020, 9:26 am EST
Hi all,
I have quite a big reactive form that has some fields being prefilled from the backend. This is fine for all the input fields except the wj-auto-complete. I am using the itemsSourceFunction in order to get my records.
Example:
<wj-auto-complete
formControlName="contact"
[itemsSourceFunction]="getUserSuggestionList"
[displayMemberPath]="'displayname'"
[selectedValuePath]="'user_id'">
</wj-auto-complete>
I currently have 9 different autocompletes in my form, all of them being prefilled by myFormGroup.patchValue({bla: value}) with some data coming from the backend. Now the problem is, that for all of those 9 fields, the itemsSourceFunction is getting triggered, causing quite some unnecessary traffic to the backend. Is there any possibility to avoid fetching the data from the backend on the initial setting of the value (no user entry)?
I’m using Angular v8 and wijmo v5.20192.624
Thank you!
Pascal