Closed seanlawrenz closed 3 years ago
I see. After 4.0.0 this started using NG_VALUE_ACCESSOR
. We're getting the valueChanges
for free. onChange
would be the event to listen to, but it's buggy as well.
If I'm reading this right the magic is in the new google.maps.places.Autocomplete(this.elemRef.nativeElement, this.autoCompleteOptions);
. Not much to go on there. What if we added a HostListener?
@HostListener('input', ['$event'])
onInputChange(e) {
this.onChange.emit(e.target.value)
}
I don't know the downstream implications from this.
In that way you will get only the value of the input as string and not as object...
I will close this ticket for the momemnt.
Please do not hesitate to reopen this issue if you still facing some problems
Bug Report or Feature Request (mark with an
x
)OS and Version?
Looks to be any
Versions
Regression started on 4.0
Repro steps
https://stackblitz.com/edit/angular-qxw1kd?file=src/app/app.module.ts
The log given by the failure
No failure. Just does not console log the change in input.
Desired functionality
I should be able to subscribe to changes to the input.
Mention any other details that might be useful