question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add autocompleteOff to MatFormFieldDefaultOptions

See original GitHub issue

Feature 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:closed
  • Created a year ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
Totaticommented, Sep 26, 2022

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.

0reactions
angular-automatic-lock-bot[bot]commented, Oct 28, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Angular mat-form-filed input disable autocomplete
I am using angular material for all my controls. We have a requirement to disable auto-complete so that any ...
Read more >
Autocomplete | Angular Material
Start by creating the autocomplete panel and the options displayed inside it. Each option should be defined by a mat-option tag. Set each...
Read more >
React Autocomplete component - Material UI - MUI
The autocomplete is a normal text input enhanced by a panel of suggested options. ... By default, the component accepts the following options...
Read more >
Turn Off AutoComplete Input Angular - Code Handbook
What worked was setting autocomplete="new-password" on input elements. <form [formGroup]="formGroup"> <div class= ...
Read more >
How to turn off form autocompletion - Web security | MDN
Setting autocomplete ="off" on fields has two effects: ... If a browser keeps on making suggestions even after setting autocomplete to off, then ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found