Posted 14 September 2017, 12:07 pm EST
Hi,
I’ve a remark about WjAutoComplete with OData bound, and control states.
My page is a basic form, with an autocomplete being loaded from an OData source as soon as the page load.
When the data are loaded (after the ngAfterViewInit then), the input goes dirty.
Refering to Angular2 doc, those states are meant to track user interactions, so I don’t think it has sense.
Here’s what I get
<div ngForm #myform="ngForm"> <wj-auto-complete #combo name="combo" required [(ngModel)]="test" [ngClass]="{'has-error': myform.dirty && combo.selectedValue==null}" [isRequired]="true" [isEditable]="false" [itemsSource]="cvVehicles" [displayMemberPath]="'Name'" [selectedValuePath]="'VehicleId'"> </wj-auto-complete> </div>
this.cvVehicles = this.oDataService.getVehicles(); // goes dirty // then I would like to have this also, which I guess could make it dirty too this.oDataService.loaded.subscribe(() => { this.cvVehicles.currentItem = null; });
Thanks in advance for your help and opinion.
