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

Checkbox not obeying parent fieldset disabled state #2763

Closed
moniuch opened this issue Jan 23, 2017 · 7 comments
Closed

Checkbox not obeying parent fieldset disabled state #2763

moniuch opened this issue Jan 23, 2017 · 7 comments
Labels
area: material/checkbox feature This issue represents a new feature or feature request rather than a bug or bug fix forms This issue is related to Angular Forms integration P5 The team acknowledges the request but does not plan to address it, it remains open for discussion

Comments

@moniuch
Copy link

moniuch commented Jan 23, 2017

Bug, feature request, or proposal:

Bug: - but I am not sure it's a bug in your component or an incomplete accessor.
I have reported it here: angular/angular#13856

I am just looking out for answer how to implement disabling a component upon fieldset disabled change and whether it can be achieved with current API (Angular 2.4.4)

What is the expected behavior?

Component should be notified of its parent fieldset disabled state.

What is the current behavior?

What are the steps to reproduce?

See this forked plunker of your checkbox - please refer to the new section I created "Fieldset test": https://plnkr.co/edit/MmQU0KLVUMFSzFgwTK9t?p=preview

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

Provide compliance with w3 standards.

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

Angular 2.4.4, all browsers

Is there anything else we should know?

I haven't tested whether the misbehavior afects also other controls but I would guess so. It's probably the matter of the NG_VALUE_ACCESSOR shape.

@arlowhite
Copy link

Not sure if related. But I encountered a bug when using FormControl.disable()
#4037
To reproduce it with material2 demo, I had to click the disabled check.
But in my own app with a ReactiveForm, the checkbox is broken after disable()/enable() even without interacting with it.

@mmacfadden
Copy link

I am having a similar issue. Calling disabled() disables the checkbox and it is grayed out. Calling enable() darkens the checkbox and it looks enabled, but you can't actually click on it any more.

@kaldmaster
Copy link

We are experiencing the same issue as well. Disabling the checkbox works as expected, but when it's enabled again it looks enabled but is not clickable. This is when using the FormControl.disable/enable(). Using the checkbox's [disabled]-binding works as expected though, so it is possible to use that as a workaround for now.

@jelbourn jelbourn added feature This issue represents a new feature or feature request rather than a bug or bug fix forms This issue is related to Angular Forms integration P5 The team acknowledges the request but does not plan to address it, it remains open for discussion labels Jun 7, 2017
@jelbourn
Copy link
Member

jelbourn commented Jun 7, 2017

this is a feature that should probably live in @angular/forms

@Splaktar
Copy link
Member

Seems to be tracked in angular/angular#13856.

@jelbourn
Copy link
Member

Closing this since the underlying issue is tracked on angular/angular#35309

@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 Mar 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: material/checkbox feature This issue represents a new feature or feature request rather than a bug or bug fix forms This issue is related to Angular Forms integration P5 The team acknowledges the request but does not plan to address it, it remains open for discussion
Projects
None yet
Development

No branches or pull requests

8 participants