angular-material-extensions / google-maps-autocomplete

Autocomplete input component and directive for google-maps built with angular and material design |
https://angular-material-extensions.github.io/google-maps-autocomplete
MIT License
169 stars 60 forks source link

Unable to mark field programmatically as invalid #313

Closed mlindhout closed 5 months ago

mlindhout commented 3 years ago

Bug Report or Feature Request (mark with an x)

- [x ] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

MacOS Big Sur

Versions

Angular CLI: 11.1.0 Node: 12.3.1 OS: darwin x64

Angular: 11.1.0

Repro steps

use is described in documentation: <mat-google-maps-autocomplete #gma country="nl" type="address" required="true" (onChange)="onAdresChange($event)" addressLabelText="Adres" placeholderText="Begin met typen..." requiredErrorText="Adres is verplicht" invalidErrorText="Dit is geen geldig adres" (onAutocompleteSelected)="onAutocompleteSelected($event)">

When using formControl name, stacktrace appears, see bug (#305). When using the elementRef 'gma', no options to mark field as invalid.

The log given by the failure

Desired functionality

Mention any other details that might be useful

AnthonyNahas commented 3 years ago

This is a good point!

PR are welcome