Signal form .reset() does not clear Angular Material error styling
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- angular, typescript
- Domínio
- frontend
Direção de pesquisa
Comece com a reprodução vinculada no StackBlitz e compare signalForm().reset() com o comportamento de @angular/forms/signals e Angular Material mat-form-field. Rastreie como reset atualiza os estados touched, dirty e de validação; considera-se concluído quando o valor é redefinido e o campo do Material não exibe mais o estilo de erro após o envio.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Which @angular/* package(s) are the source of the bug?
core, forms
Is this a regression?
No
Description
When using Angular Material form fields (mat-form-field) with signal-based forms (@angular/forms/signals), resetting the form after submission causes the Material input to display error styling (red outline) even though the field should no longer be in a touched or dirty state.
After calling signalForm().reset() on submit, the field value is correctly reset to an empty string. However, the Material form field renders as invalid with error styling applied. According to Angular Material's documented behavior, error styling should only be shown when the control has been touched. Since reset() is expected to clear both the touched and dirty states, the field should return to its pristine, untouched appearance — without any validation error indicators.
Please provide a link to a minimal reproduction of the bug
Please provide the exception or error you saw
N/A
Please provide the environment you discovered this bug in (run ng version)
Angular CLI : 22.0.4
Angular : 22.0.4
Node.js : 26.1.0
Package Manager : npm 11.13.0
Operating System : win32 x64
┌───────────────────────────┬───────────────────┬───────────────────┐
│ Package │ Installed Version │ Requested Version │
├───────────────────────────┼───────────────────┼───────────────────┤
│ @angular/build │ 22.0.4 │ ^22.0.0 │
│ @angular/cdk │ 22.0.2 │ ^22.0.2 │
│ @angular/cli │ 22.0.4 │ ^22.0.0 │
│ @angular/common │ 22.0.4 │ ^22.0.0 │
│ @angular/compiler │ 22.0.4 │ ^22.0.0 │
│ @angular/compiler-cli │ 22.0.4 │ ^22.0.0 │
│ @angular/core │ 22.0.4 │ ^22.0.0 │
│ @angular/forms │ 22.0.4 │ ^22.0.0 │
│ @angular/material │ 22.0.2 │ ^22.0.2 │
│ @angular/platform-browser │ 22.0.4 │ ^22.0.0 │
│ @angular/router │ 22.0.4 │ ^22.0.0 │
│ rxjs │ 7.8.2 │ ~7.8.0 │
│ typescript │ 6.0.3 │ ~6.0.2 │
│ vitest │ 4.1.9 │ ^4.0.8 │
└───────────────────────────┴───────────────────┴───────────────────┘
Anything else?
No response
- Linguagem predominante
- TypeScript
- Estrelas
- 25k
- Forks
- 6.8k
- Merge médio
- 1d 9h
- PRs com merge (30d)
- 79
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de angular/components
-
bug(material/sort): hover hint arrow on an unsorted header shows the active sort direction, not the resulting direction after click.Talvez já em andamento @lekhmanrus assumiu há 6 dias. Abertaarea: material/sort gemini-triaged needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
angular/components#33933 ·
Mantenedores costumam responder em até 1 dia
-
bug(mat-date-picker): month shown twice in date pickerTalvez já em andamento @PreethiPantangi assumiu há 23 dias. Abertaarea: material/datepicker P4
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
angular/components#33763 · 2 comentários · 3 reações ·
Mantenedores costumam responder em até 1 dia
-
Bug in table.scss footer cell height: unset instead of footer row height unsetTalvez já em andamento @minwookshin assumiu há 10 dias. Abertaarea: material/table P4
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 88/100
angular/components#33709 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
docs-bug(Table): Add example with `rowspan`Talvez já em andamento @BHUVANSH855 assumiu há 91 dias. Abertaarea: material/table docs P4
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
angular/components#33455 ·
Mantenedores costumam responder em até 1 dia
-
bug(date-adapter): Misleading JSDoc for createDate returns typeTalvez já em andamento @BHUVANSH855 assumiu há 140 dias. Abertaarea: material/core P3
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 78/100
angular/components#33059 · 2 comentários ·
Mantenedores costumam responder em até 1 dia
Todas as issues de angular/components
Issues semelhantes
-
afk-ok area:data-quality importer size:S
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
enorm-labs/event-junkie#3301 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
one-zero-eight/apply-bot#39 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Mantenedores costumam responder em até 2 dias
-
area: app type: bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
ExpidetGames/code-reviewer#308 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia