File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 34
34
}
35
35
}
36
36
37
- .mat-list-option.mat-single-selected {
38
- background : mat-color ($background , hover , 0.12 );
37
+ .mat-list-single-selected-option {
38
+ & , & :hover , & :focus {
39
+ background : mat-color ($background , hover , 0.12 );
40
+ }
39
41
}
40
42
}
41
43
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import {
40
40
SimpleChanges ,
41
41
ViewChild ,
42
42
ViewEncapsulation ,
43
+ isDevMode ,
43
44
} from '@angular/core' ;
44
45
import { ControlValueAccessor , NG_VALUE_ACCESSOR } from '@angular/forms' ;
45
46
import {
@@ -109,7 +110,7 @@ export class MatSelectionListChange {
109
110
// be placed inside a parent that has one of the other colors with a higher specificity.
110
111
'[class.mat-accent]' : 'color !== "primary" && color !== "warn"' ,
111
112
'[class.mat-warn]' : 'color === "warn"' ,
112
- '[class.mat-single-selected]' : 'selected && !selectionList.multiple' ,
113
+ '[class.mat-list- single-selected-option ]' : 'selected && !selectionList.multiple' ,
113
114
'[attr.aria-selected]' : 'selected' ,
114
115
'[attr.aria-disabled]' : 'disabled' ,
115
116
} ,
@@ -384,7 +385,7 @@ export class MatSelectionList extends _MatSelectionListMixinBase implements CanD
384
385
const newValue = coerceBooleanProperty ( value ) ;
385
386
386
387
if ( newValue !== this . _multiple ) {
387
- if ( this . _contentInitialized ) {
388
+ if ( isDevMode ( ) && this . _contentInitialized ) {
388
389
throw new Error (
389
390
'Cannot change `multiple` mode of mat-selection-list after initialization.' ) ;
390
391
}
You can’t perform that action at this time.
0 commit comments