bug(MatDatePicker): change events emitted despite using emitEvents false
- Dominant language
- TypeScript
- Stars
- 25k
- Forks
- 6.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 91
Description
#### Reproduction
https://stackblitz.com/edit/components-issue-xay9ty?file=src%2Fapp%2Fexample-component.ts
1. Click the "emitEvent: false" button
#### Expected Behavior
`valueChanges` should not emit values when setting a value with `emitEvent: false`
This works correctly for "normal" input components, but not when attaching a date picker.
The reproduction includes a text input and a select for comparison.
#### Actual Behavior
Using `setValue` or `patchValue` with `emitEvent` set to `false` has the `valueChanges` observable emit changes.
#### Environment
- Angular: 10.0.3
- CDK/Material: 10.0.3
- Browser: Chrome
- Operating System: Windows
Contributor guide
Research direction
Open the linked StackBlitz reproduction and inspect src/app/example-component.ts. Click the "emitEvent: false" button, compare the date-picker behavior with the text input and select, and trace the valueChanges emissions. Done means setValue and patchValue with emitEvent: false produce no valueChanges emissions for the date picker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100