angular / angular/components

bug(MatAutoComplete): requiredSelection value racecon on panel close

未关闭
#30,447 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/autocomplete P4
主要语言
TypeScript
星标
25k
派生
6.8k
平均合并
1 天 8 小时
30 天内合并 PR
91

描述

### Is this a regression?

- [ ] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

_No response_

### Description

Autocomplete using "requiredSelection" results in a racecon upon closing the panel

https://github.com/user-attachments/assets/5b211777-c457-47a1-8096-3894430e0d2d

### Reproduction

StackBlitz link: https://stackblitz.com/edit/q5xjs54i?file=src%2Fexample%2Fautocomplete-require-selection-example.ts
Steps to reproduce:
1. open panel
2. while panel is open click reset button

### Expected Behavior

Control value should be set after clicking "reset" button while the autocomplete panel is open

### Actual Behavior

Control has no value after clicking "reset" button while the autocomplete panel is open

### Environment

- Angular: 19.0.0
- CDK/Material: 19.0.0
- Browser(s):
- Operating System (e.g. Windows, macOS, Ubuntu):

贡献指南

打开贡献指南

调研方向

Start with the linked StackBlitz reproduction in src/example/autocomplete-require-selection-example.ts, focusing on the reset button while the autocomplete panel is open. Trace the panel-close and reset sequence; done means the control retains its value after reset, matching the expected behavior.

由索引模型根据 Issue 内容生成。

评估

技术栈
angular, typescript
领域
frontend
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。