bug(MatDatePicker): change events emitted despite using emitEvents false
- 主要语言
- TypeScript
- 星标
- 25k
- 派生
- 6.8k
- 平均合并
- 1 天 8 小时
- 30 天内合并 PR
- 91
描述
#### 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
贡献指南
调研方向
打开链接的 StackBlitz 复现,并检查 src/app/example-component.ts。点击 "emitEvent: false" 按钮,将 date-picker 的行为与文本输入框和 select 进行比较,并跟踪 valueChanges 的发出情况。当使用 emitEvent: false 调用 setValue 和 patchValue 时,date-picker 不产生任何 valueChanges 发出,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend
- Issue 类型
- 缺陷
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 45/100