fix(material/checkbox): no color assigned if defaults don't have a color - #21042
Conversation
| let nextUniqueId = 0; | ||
|
|
||
| // Default checkbox configuration. | ||
| const defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(); |
There was a problem hiding this comment.
Invoking the factory directly feels a little weird, but I'm trying to avoid repeating the default color across different files.
There was a problem hiding this comment.
Yeah I'm not even sure why its a factory, feels like it could just be provided with useValue. I'm fine with doing this, we can revisit if it ever becomes problematic.
Fixes an issue where a `mat-checkbox` wouldn't have a `color`, if the `MAT_CHECKBOX_DEFAULT_OPTIONS` was provided without one. Fixes angular#21031.
74e0134 to
cb9875b
Compare
| let nextUniqueId = 0; | ||
|
|
||
| // Default checkbox configuration. | ||
| const defaults = MAT_CHECKBOX_DEFAULT_OPTIONS_FACTORY(); |
There was a problem hiding this comment.
Yeah I'm not even sure why its a factory, feels like it could just be provided with useValue. I'm fine with doing this, we can revisit if it ever becomes problematic.
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes an issue where a
mat-checkboxwouldn't have acolor, if theMAT_CHECKBOX_DEFAULT_OPTIONSwas provided without one.Fixes #21031.