angular / angular/angular

Allow disable in SignalFormControl

Open
#68,882 0 comments 3 reactions 0 assignees View on GitHub
area: forms forms: signals
Dominant language
TypeScript
Stars
101k
Forks
27.5k
Avg merge
1d 19h
Merged PRs (30d)
288

Description

### Which @angular/* package(s) are relevant/related to the feature request?

forms

### Description

I have two issues preventing me from using SignalFormControl in my application.

It's value is untyped in the parents value & controls. That's pretty disappointing when all our forms are typed.

But the even bigger issue is throwing an exception when trying to disable a FormGroup that contains a SignalFormControl. With this restriction we can't disable the form when the user lacks permissions, or while loading data, etc.

### Proposed solution

Allow enabling/disabling the SignalFormControl (at least from the parent form group).

And if possible extend ```AbstractConrol```. Although I assume there's probably a reason you didn't?

### Alternatives considered

Refactoring the whole form to signal forms. I don't think SignalFormConrol is useful as a bridge with these restrictions.

Contributor guide

Open the contributing guide

Research direction

Start by tracing SignalFormControl's integration with FormGroup and AbstractControl in the forms package. Confirm how parent-group enable/disable state and value typing currently flow into SignalFormControl. Done means a parent FormGroup can disable and re-enable it without an exception, with typed values preserved where applicable.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.