bug(MatSelect): Mdc line ripple doesn't use the color from the theme if it gets disabled right after receiving a value
- 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?
- [ ] Yes, this behavior used to work in the previous version
### The previous version in which this bug was not present was
_No response_
### Description
The bottom "line ripple" of a mat-select field doesn't always retrieve its color from the theme variable `--mdc-filled-text-field-disabled-active-indicator-color` when disabled.
See example below :
On this example, the two select inputs are identical and inherit the same styles, the sole difference is that the first input is disabled from the start and the second input is disabled once an option is selected.
If I inspect the line ripple, it seems that once I picked a value and disabled the input the line ripple `:after` selector changes and inherit a color from `--mat-app-text-color` :
If I manually change the color in `:after` to transparent, I get the expect result :
### Reproduction
StackBlitz link: https://stackblitz.com/edit/jnudjj
Steps to reproduce:
1. In theme.scss, after Material theme import, override the value from ` --mdc-filled-text-field-disabled-active-indicator-color`to differentiate it easily
2. Create a component with one mat-select input which gets disabled right after we picked a value :
``
### Expected Behavior
I get an indentical color for the line ripple whether mat-select is disabled from the start or after picking a value.
### Actual Behavior
When a mat-select input gets disabled right after a value is picked, the line ripple color is not correct.
### Environment
- Angular: 17.3.1
- CDK/Material: 17.3.1
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): macOS
Guía de contribución
Línea de trabajo
Comienza con la reproducción en StackBlitz, su sobrescritura de theme.scss y el componente mat-select cuyo estado deshabilitado depende de un valor seleccionado. Compara el estilo del ripple de línea cuando el select comienza deshabilitado con el estilo después de que la selección lo deshabilita. Se considera terminado cuando ambos casos usan el --mdc-filled-text-field-disabled-active-indicator-color sobrescrito.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- angular, scss, 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
- 45/100