angular / angular/components

matTabLink `disabled` input should be `matTabLinkDisabled`

オープン
#17,446 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area: material/tabs G P3 target: major
主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 8時間
マージ済み PR(30日)
91

説明

#### Reproduction

Use StackBlitz to reproduce your issue: https://stackblitz.com/edit/angular-zju32k

Steps to reproduce:
1. Put a tooltip on a `matTabLink`
2. Disabled the `matTabLink`

#### Expected Behavior

Tab should be disabled, and tooltip should show.

#### Actual Behavior

Tooltip did not show.

#### Notes/Thoughts

If the input is changed to `matTabLinkDisabled`, then `disabled` and `[disabled]="true"` should still be able to work. However, it would also be possible to use `matTabLinkDisabled`, which would make it possible to disable the `MatTabLink` specifically, without disabling any other directive on the element.

I *believe* this would be a non breaking change, as the input is declared in the `inputs` field on component:

```typescript
@Directive({
selector: '[mat-tab-link], [matTabLink]',
exportAs: 'matTabLink',
inputs: ['disabled', 'disableRipple', 'tabIndex'], // <== HERE
host: {
'class': 'mat-tab-link',
'[attr.aria-current]': 'active ? "page" : null',
'[attr.aria-disabled]': 'disabled',
'[attr.tabIndex]': 'tabIndex',
'[class.mat-tab-disabled]': 'disabled',
'[class.mat-tab-label-active]': 'active',
}
})
export class MatTabLink
```
So *my understanding* is right now, you can’t read the disabled field by name anyways.

#### Environment

- Angular: 8.2.11
- CDK/Material: 8.2.1
- Browser(s): Version 77.0.3865.120 (Official Build) (64-bit)
- Operating System (e.g. Windows, macOS, Ubuntu): Debian Rodette

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

issue に示されている StackBlitz の再現と MatTabLink ディレクティブの宣言から始め、disabled input と tooltip の相互作用に焦点を当ててください。完了条件は、無効化されたタブリンクでも tooltip が引き続き表示され、disabled と matTabLinkDisabled の両方が説明どおり使用可能なままであることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
angular, typescript
領域
frontend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。