angular / angular/components

bug(chip): chip selection state does not match [selected] v19.1.1

Abierto
#30,527 7 comentarios 0 reacciones 0 asignados Ver en GitHub
area: material/chips P3
Lenguaje dominante
TypeScript
Estrellas
25k
Forks
6.8k
Merge medio
1 d 8 h
PR fusionados (30 d)
91

Descripción

### Is this a regression?

- [x] Yes, this behavior used to work in the previous version

### The previous version in which this bug was not present was

19.1.0

### Description

I have a component with selectable stacked chips with drag drop to rearrange/toggle columns of my table.

after 19.1.1 update moving deselected chip changes the selection of other chips not respecting the [selected] in mat-chip-option

### Reproduction

I have create a minimal reproduction of the issue

https://github.com/Siddhu-K/chip-drag

toggle chips and drag drop.

```

@for (i of chip_list(); track i; let index = $index) {

{{ index + 1 + ". " + i.name + " - " + i.selected }}

}

```

### Expected Behavior

actual selection should match [selected] in the mat-chip-option

### Actual Behavior

actual selection does not match [selected] in the mat-chip-option

### Environment

Angular CLI: 19.1.8
Node: 22.13.0
Package Manager: npm 11.1.0
OS: win32 x64

Angular: 19.1.7
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1901.8
@angular-devkit/build-angular 19.1.8
@angular-devkit/core 19.1.8
@angular-devkit/schematics 19.1.8
@angular/cdk 19.1.5
@angular/cli 19.1.8
@angular/material 19.1.5
@schematics/angular 19.1.8
rxjs 7.8.1
typescript 5.7.3
zone.js 0.15.0

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Comienza con la reproducción mínima vinculada en github.com/Siddhu-K/chip-drag y reproduce el problema alternando chips y, después, arrastrando un chip deseleccionado. Rastrea la interacción entre mat-chip-listbox, mat-chip-option [selected] y cdkDropList. Se considera terminado cuando la selección renderizada sigue siendo coherente con el valor selected de cada chip después de reordenarlos.

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
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
38/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.