Add autocompleteOff to MatFormFieldDefaultOptions
See original GitHub issueFeature Description
Feature Description
Please add an option to MatFormFieldDefaultOptions to disable the autocomplete on the field.
This will allow us to default all form fields with disabled autocomplete without specifying the autocomplete="off"
on each one. Add the field to MatFormFieldDefaultOptions and default the value of the autocompleteOff input of MatFormField this this value (I think this is trivial)
Use Case
In our app our UX team wants all autocompletes on all forms to be turned off default, so setting it on each from is overkill. We have to specify autocomplete="off"
on every single usage of MatFormField which is tedious and becomes error prone. Add this feature would eliminate this issue for us.
PS: this feature request is based on this feature request: https://github.com/angular/components/issues/16243
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:5 (2 by maintainers)
Top GitHub Comments
I think MatFormField has nothing to do with this. It does not have the reference of the underlying native input which could be a select too. Select does not have autocomplete attribute. This feauture could be implemented in MatInput, however IMO it’s easy to create a directive that matches the
[matInput]:([autocomplete])
selector which dose this thing for you.This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.