From a61437eb3821756f0a67b7c1bdf3721f368973e3 Mon Sep 17 00:00:00 2001 From: Kristiyan Kostadinov Date: Sun, 28 Sep 2025 09:54:25 +0200 Subject: [PATCH] fix(material/select): rotate arrow while open Rotates the select's arrow while it's open. Fixes #29985. Fixes #31869. --- src/material/select/select.scss | 8 ++++++++ src/material/select/select.ts | 1 + 2 files changed, 9 insertions(+) diff --git a/src/material/select/select.scss b/src/material/select/select.scss index dcab8aa62662..960356863fc3 100644 --- a/src/material/select/select.scss +++ b/src/material/select/select.scss @@ -120,6 +120,14 @@ div.mat-mdc-select-panel { color: token-utils.slot(select-disabled-arrow-color, $fallbacks); } + .mat-select-open & { + transform: rotate(180deg); + } + + .mat-form-field-animations-enabled & { + transition: transform variables.$swift-linear-duration variables.$swift-linear-timing-function; + } + svg { fill: currentColor; position: absolute; diff --git a/src/material/select/select.ts b/src/material/select/select.ts index 1252711bb9d6..b05f7f8b6e3a 100644 --- a/src/material/select/select.ts +++ b/src/material/select/select.ts @@ -177,6 +177,7 @@ export class MatSelectChange { '[class.mat-mdc-select-required]': 'required', '[class.mat-mdc-select-empty]': 'empty', '[class.mat-mdc-select-multiple]': 'multiple', + '[class.mat-select-open]': 'panelOpen', '(keydown)': '_handleKeydown($event)', '(focus)': '_onFocus()', '(blur)': '_onBlur()',