Feature Request : Mat-Tab select by name.
- Lenguaje dominante
- TypeScript
- Estrellas
- 25k
- Forks
- 6.8k
- Merge medio
- 1 d 8 h
- PR fusionados (30 d)
- 91
Descripción
#### Bug, feature request, or proposal:
Feature Request for material tabs
#### What is the expected behavior?
The ability to select a tab by its name, like this;
``
``
#### What is the current behavior?
``
#### What is the use-case or motivation for changing an existing behavior?
I am using the material tabs in a responsive app. When the app is in mobile size I display 5 tabs, when the app is in desktop size I display 3 tabs. The reason is since there is more room on the desktop I combine the content and show less tabs.
The issue is when I try to link to a specific tab via a URL. I would use a query parameter like ?tabindex=2. However since my tab index changes depending on the application size, the link will work in one case and not the other. So it would be useful to link to the tab by name like this, ?tab=profile. This way I can pass the name to the component and it can figure out the active tab regardless of the index number.
Guía de contribución
Línea de trabajo
Comienza por los puntos de entrada mat-tab-group y mat-tab descritos en el issue, y revisa cómo selectedIndex controla actualmente la pestaña activa. Define cómo debe comportarse una API de selección basada en nombres cuando las pestañas se muestran o se combinan de forma responsiva, y verifica después que una URL como ?tab=profile seleccione la pestaña prevista independientemente de su índice.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, typescript
- Área
- frontend
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 30/100