ionic-team / ionic-team/ionic-framework

bug: ion-button-segment with content-id cannot be disabled

未关闭
#30,662 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
triage
主要语言
TypeScript
星标
52.7k
派生
13.3k
平均合并
1 天 14 小时
30 天内合并 PR
50

描述

### Prerequisites

- [x] I have read the [Contributing Guidelines](https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#creating-an-issue).
- [x] I agree to follow the [Code of Conduct](https://ionicframework.com/code-of-conduct).
- [x] I have searched for [existing issues](https://github.com/ionic-team/ionic-framework/issues) that already report this problem, without success.

### Ionic Framework Version

v8.x

### Current Behavior

When setting `[disabled]="true"` on an `ion-segment-button` with `content-id` matching a `ion-segment-content`, the button can still be interacted with.

### Expected Behavior

The disabled button shouldn't be interactable

### Steps to Reproduce

```


First


Second

First
Second

```

### Code Reproduction URL

https://stackblitz.com/edit/bw1epcxh?file=src%2Fapp%2Fexample.component.html

### Ionic Info

```
Ionic:

Ionic CLI : 7.2.1 (/Users/jongbonga/.nvm/versions/node/v20.19.4/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 8.7.3
@angular-devkit/build-angular : 19.2.15
@angular-devkit/schematics : 19.2.14
@angular/cli : 19.2.14
@ionic/angular-toolkit : 12.3.0

Capacitor:

Capacitor CLI : 7.4.3
@capacitor/android : 7.4.3
@capacitor/core : 7.4.3
@capacitor/ios : 7.4.3

Utility:

cordova-res : not installed globally
native-run : 2.0.1

System:

NodeJS : v20.19.4 (/Users/jongbonga/.nvm/versions/node/v20.19.4/bin/node)
npm : 10.8.2
OS : macOS Unknown
```

### Additional Information

_No response_

贡献指南

打开贡献指南

调研方向

从 Angular reproduction 中 ion-segment-button 和 ion-segment-content 的行为开始,重点关注 content-id 如何将按钮连接到其内容。使用提供的 StackBlitz reproduction 确认被禁用的第二个按钮仍然可以交互。完成的标准是禁用的按钮不再可交互,而启用的按钮仍然有效。

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

评估

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

把新 issue 发到你的邮箱

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