angular / angular/components

feat(Listbox): Allow Listbox to be found in content projection

Abierto
#26,556 3 comentarios 7 reacciones 0 asignados Ver en GitHub
area: cdk/listbox feature P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Feature Description

The Listbox cdk directive could be used as a select component's options. This would be nice because it has built in accessibilty features and keyboard interactions. The problem is if those select component options are content projected they cannot find their parent listbox directive.

### Use Case

So if I wanted my custom select component implementation to look like this:

![image](https://user-images.githubusercontent.com/26122765/216383475-edeaf89e-5798-49e3-b8fa-8b269a46cc19.png)

The custom select options are being content projected and the custom select logic would look something like this:

![image](https://user-images.githubusercontent.com/26122765/216383926-10a91b6e-005c-4e4d-8f55-edc2ac19f073.png)

The select option that is not content projected is working as expected but the content projected ones are not finding their parent listbox and therefore not behaving correctly.

Stackblitz for reference : https://stackblitz.com/edit/angular-ivy-tcfqrs?embed=1&file=src/app/select/select.component.ts

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción vinculada de StackBlitz e inspecciona cómo se resuelve la Listbox CDK directive para las opciones proyectadas frente a las no proyectadas. Confirma el comportamiento del ejemplo de selección personalizada y, después, verifica que las content-projected options encuentren su Listbox padre y conserven las interacciones esperadas de accesibilidad y teclado.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
angular, typescript
Área
accessibility, frontend
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.