angular / angular/components

docs-bug(chips): the "form example" is not fully related to forms

Aperta
#32,537 2 commenti 1 reazione 0 assegnatari Vedi su GitHub
area: material/chips docs P4
Lingua principale
TypeScript
Stelle
25k
Fork
6.8k
Merge medio
1g 8h
PR unite (30g)
91

Descrizione

### Documentation Feedback

We have `chips-form-control-example`, `chips-reactive-form-example` components that intend to illustrate how chips interact with the form control.
I see 2 problems here.

1. The interaction with `mat-chip-grid` is happening not fully through the formControl. For now the source of chips's list is `keywords` signal, not the formControl: `@for (keyword of keywords(); track keyword) {`
It seems we should take the formControl as the source of chips's list (not the signal): `@for (keyword of formControl.value || []; track keyword) {`
Moreover we could get rid of the signal, because the goal of the example is to show the interaction between the formControl and the chips in the template.

2. These two examples of `chips-form-control-example` and `chips-reactive-form-example` components duplicate each other. They have the same logic inside of components classes. So it seems we could leave only one of these two examples.

### Affected documentation page

https://material.angular.dev/components/chips/examples

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con i componenti chips-form-control-example e chips-reactive-form-example menzionati nell’issue e analizza gli esempi mostrati nella pagina della documentazione di chips. Confronta le relative classi e i template; il lavoro è completato quando l’elenco di chips viene mostrato tramite il formControl invece del keywords signal e l’esempio duplicato viene rimosso o consolidato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
angular, typescript
Ambito
documentation, frontend
Tipo di issue
Documentazione
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.