Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mat-form-field required fields should remove the * when disabled #8251

Closed
robmv opened this issue Nov 6, 2017 · 1 comment · Fixed by #8799
Closed

mat-form-field required fields should remove the * when disabled #8251

robmv opened this issue Nov 6, 2017 · 1 comment · Fixed by #8799
Assignees
Labels
Accessibility This issue is related to accessibility (a11y) help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent

Comments

@robmv
Copy link

robmv commented Nov 6, 2017

Bug, feature request, or proposal:

Proposal

What is the expected behavior?

When a mat-form-field has an input that is required and disabled, It should not append the asterisk to the label. This is useful when the enabled status is controlled by some other form state, It doesn't make sense to display an input as required (with a *) while it is disabled.

What is the current behavior?

The mat-form-field component always show the asterisk even when the form control is disabled.

What are the steps to reproduce?

https://stackblitz.com/edit/angular-material2-issue-uthrg2?file=app%2Fapp.component.html

What is the use-case or motivation for changing an existing behavior?

When control enable status is dynamic, the asterisk should be only shown when they are required and enabled, doing it manually requires doing always the enable state change and the required changed at the same time.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?

Material 2.0.0-beta.12

Is there anything else we should know?

@josephperrott josephperrott added P2 The issue is important to a large percentage of users, with a workaround Accessibility This issue is related to accessibility (a11y) labels Nov 9, 2017
@mmalerba mmalerba added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent and removed P2 The issue is important to a large percentage of users, with a workaround labels Nov 11, 2017
@mmalerba mmalerba added the help wanted The team would appreciate a PR from the community to address this issue label Nov 21, 2017
devversion added a commit to devversion/material2 that referenced this issue Dec 4, 2017
* No longer shows the required asterisk if the form control is disabled.

Fixes angular#8251.
devversion added a commit to devversion/material2 that referenced this issue Dec 31, 2017
* No longer shows the required asterisk if the form control is disabled.

Fixes angular#8251.
andrewseguin pushed a commit that referenced this issue Jan 12, 2018
* No longer shows the required asterisk if the form control is disabled.

Fixes #8251.
andrewseguin pushed a commit to andrewseguin/components that referenced this issue Jan 12, 2018
…ar#8799)

* No longer shows the required asterisk if the form control is disabled.

Fixes angular#8251.
andrewseguin pushed a commit that referenced this issue Jan 17, 2018
* No longer shows the required asterisk if the form control is disabled.

Fixes #8251.
@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 8, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Accessibility This issue is related to accessibility (a11y) help wanted The team would appreciate a PR from the community to address this issue P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants