angular / angular/components

bug(MatChipInput): MatChipInput does not set `mat-form-field-disabled` on MatFormField wrapper when being disabled

未关闭
#31,468 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area: material/chips P3
主要语言
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

When a MatChipInput is disabled, it does not set `mat-form-field-disabled` CSS class on its MatFormField wrapper like it does for MatInput.

### Reproduction

StackBlitz link: https://stackblitz.com/edit/xcgzeewq?file=src%2Fexample%2Fchips-input-example.html
Steps to reproduce:
1. There are one disabled MatChipInput and one disabled MatInput in the example
2. The form field wrapper of the MatInput has `mat-form-field-disabled` CSS class, while the form field wrapper of the MatChipInput does not

### Expected Behavior

Both of the form field should set `mat-form-field-disabled` CSS class as the input is disabled.

### Actual Behavior

The form field wrapper of the MatInput has `mat-form-field-disabled` CSS class, while the form field wrapper of the MatChipInput does not

### Environment

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

贡献指南

打开贡献指南

调研方向

从所链接的 StackBlitz 中的 src/example/chips-input-example.html 开始复现,并将禁用的 MatChipInput 与禁用的 MatInput 进行比较。验证两种情况下 MatFormField wrapper 的行为,并确认完成的更改会使 wrapper 在 chip input 被禁用时接收 mat-form-field-disabled。

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

评估

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

把新 issue 发到你的邮箱

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