Skip to content

Commit 6fba204

Browse files
authored
fix(material/select): rotate arrow while open (#31936)
Rotates the select's arrow while it's open. Fixes #29985. Fixes #31869.
1 parent d02338b commit 6fba204

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/material/select/select.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,14 @@ div.mat-mdc-select-panel {
120120
color: token-utils.slot(select-disabled-arrow-color, $fallbacks);
121121
}
122122

123+
.mat-select-open & {
124+
transform: rotate(180deg);
125+
}
126+
127+
.mat-form-field-animations-enabled & {
128+
transition: transform variables.$swift-linear-duration variables.$swift-linear-timing-function;
129+
}
130+
123131
svg {
124132
fill: currentColor;
125133
position: absolute;

src/material/select/select.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@ export class MatSelectChange<T = any> {
177177
'[class.mat-mdc-select-required]': 'required',
178178
'[class.mat-mdc-select-empty]': 'empty',
179179
'[class.mat-mdc-select-multiple]': 'multiple',
180+
'[class.mat-select-open]': 'panelOpen',
180181
'(keydown)': '_handleKeydown($event)',
181182
'(focus)': '_onFocus()',
182183
'(blur)': '_onBlur()',

0 commit comments

Comments
 (0)