Skip to content

fix(mat-input): matInput with type number fires twice changeValue event inside formGroup #9620

@gogakoreli

Description

@gogakoreli

Bug, feature request, or proposal:

Bug

What is the expected behavior?

matInput with type="number" shouldn't fire valueChanges event twice, when inside ReactiveForm

What is the current behavior?

matInput with type="number" fires valueChanges event twice, when inside ReactiveForm

What are the steps to reproduce?

https://stackblitz.com/edit/type-number-input-2-value-changes-fired

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

Event shouldn't fire twice it is extra and bad performance wise

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

5.2.2

Is there anything else we should know?

Open console inside developer tools and look at console when changing value of Age inside my StackBlitz example. You can see that when you change value of age event is fired once and then when you move your focus on other component it fires second same event again.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions