This PR adds a control prop to the input-autocomplete directive.
Currently, using reactive forms it's not possible to programmatically update the value of the input as you would expect.
For example, using this.formGroup.controls.formControl.setValue('') will not update the AutocompletComponent it will only update the original input underneath it.
With this update if you're using reactive forms, you can now pass the FormControl into the input as a prop like <input input-autocomplete [control]="formControl"> for FormControl methods such as setValue or reset to work.
This PR adds a
control
prop to theinput-autocomplete
directive.Currently, using reactive forms it's not possible to programmatically update the value of the input as you would expect.
For example, using
this.formGroup.controls.formControl.setValue('')
will not update theAutocompletComponent
it will only update the original input underneath it.With this update if you're using reactive forms, you can now pass the
FormControl
into the input as a prop like<input input-autocomplete [control]="formControl">
for FormControl methods such assetValue
orreset
to work.