angular / angular/components

bug(MatChipList): chip list disabled should respect each chip item disabled state

未关闭
#27,971 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

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

Chiplist [disabled] toggling from disable to enable doesn't respect each chip item [disabled] state. Chip items, which are actually disabled become visually enabled.

Reproduction

StackBlitz link: https://stackblitz.com/edit/vdefsz?file=src%2Fexample%2Fchips-input-example.html,src%2Fexample%2Fchips-input-example.ts

Steps to reproduce:

  1. The chip item is disabled and has properly disabled styles in initialization
    2023-10-20_15h12_54
  2. Click 'Disable chiplist'
  3. Click 'Enable chiplist'
Expected Behavior

The chip item is visually disabled

Actual Behavior

The chip item ignores its disabled state and looks like enabled

Environment
  • Angular: 16.2.9
  • CDK/Material: 16.2.9
  • Browser(s): Google Chrome, Version 118.0.5993.88 (Official Build) (64-bit)
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

使用链接的 StackBlitz 复现,并从 src/example/chips-input-example.html 和 src/example/chips-input-example.ts 开始。重现禁用/启用顺序,然后跟踪 MatChipList 的状态处理;完成的标准是,重新启用 chip list 后,单独禁用的 chips 仍保持禁用外观。

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

评估

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

把新 issue 发到你的邮箱

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