matTabLink `disabled` input should be `matTabLinkDisabled`
- Lingua principale
- TypeScript
- Stelle
- 25k
- Fork
- 6.8k
- Merge medio
- 1g 8h
- PR unite (30g)
- 91
Descrizione
#### 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
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia con la riproduzione StackBlitz e la dichiarazione della direttiva MatTabLink mostrate nell’issue, concentrandoti sull’interazione tra il suo input disabled e il tooltip. Il lavoro è completato quando un collegamento di tab disabilitato continua a visualizzare il proprio tooltip, mentre sia disabled sia matTabLinkDisabled rimangono utilizzabili come descritto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- angular, typescript
- Ambito
- frontend
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 48/100