Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(material/select): active class not removed from reset option when new value is assigned through form control #26414

Merged
merged 1 commit into from Jan 12, 2023

Conversation

crisbeto
Copy link
Member

Fixes that we weren't removing the active class from a reset option when a new value is assigned through a FormControl. The problem was that we were removing the active classes only from selected options, but a reset option is never selected.

Fixes #26390.

… new value is assigned through form control

Fixes that we weren't removing the active class from a reset option when a new value is assigned through a `FormControl`. The problem was that we were removing the active classes only from selected options, but a reset option is never selected.

Fixes angular#26390.
@crisbeto crisbeto added P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release labels Jan 12, 2023
@crisbeto crisbeto added the action: merge The PR is ready for merge by the caretaker label Jan 12, 2023
@crisbeto crisbeto self-assigned this Jan 12, 2023
@crisbeto crisbeto merged commit 769e204 into angular:main Jan 12, 2023
crisbeto added a commit that referenced this pull request Jan 12, 2023
… new value is assigned through form control (#26414)

Fixes that we weren't removing the active class from a reset option when a new value is assigned through a `FormControl`. The problem was that we were removing the active classes only from selected options, but a reset option is never selected.

Fixes #26390.

(cherry picked from commit 769e204)
crapStone pushed a commit to Calciumdibromid/CaBr2 that referenced this pull request Jan 20, 2023
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [@angular/cdk](https://github.com/angular/components) | dependencies | patch | [`15.1.0` -> `15.1.1`](https://renovatebot.com/diffs/npm/@angular%2fcdk/15.1.0/15.1.1) |
| [@angular/material](https://github.com/angular/components) | dependencies | patch | [`15.1.0` -> `15.1.1`](https://renovatebot.com/diffs/npm/@angular%2fmaterial/15.1.0/15.1.1) |

---

### Release Notes

<details>
<summary>angular/components</summary>

### [`v15.1.1`](https://github.com/angular/components/blob/HEAD/CHANGELOG.md#&#8203;1511-purple-plush-2023-01-18)

[Compare Source](angular/components@15.1.0...15.1.1)

##### material

| Commit | Type | Description |
| -- | -- | -- |
| [0fc52fca6](angular/components@0fc52fc) | fix | **schematics:** don't migrate unknown stylesheet formats ([#&#8203;26450](angular/components#26450)) |
| [6bdc2e383](angular/components@6bdc2e3) | fix | **select:** active class not removed from reset option when new value is assigned through form control ([#&#8203;26414](angular/components#26414)) |
| [072d6d036](angular/components@072d6d0) | fix | **slider:** Use non-deprecated theme key ([#&#8203;26378](angular/components#26378)) |

#### Special Thanks

Alan Agius, Alka Vats, Kevin Vizcarra, Kristiyan Kostadinov and Paul Gschwendtner

<!-- CHANGELOG SPLIT MARKER -->

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these updates again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xMDUuMyIsInVwZGF0ZWRJblZlciI6IjM0LjEwNi4wIn0=-->

Co-authored-by: cabr2-bot <cabr2.help@gmail.com>
Reviewed-on: https://codeberg.org/Calciumdibromid/CaBr2/pulls/1741
Reviewed-by: Epsilon_02 <epsilon_02@noreply.codeberg.org>
Co-authored-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
Co-committed-by: Calciumdibromid Bot <cabr2_bot@noreply.codeberg.org>
@pedroestabruxelles
Copy link

pedroestabruxelles commented Jan 20, 2023

@crisbeto is it possible to include also on v14? This was actually reported on version 14.
We just found out about this bug while playing around with adding/removing mat-options

@crisbeto
Copy link
Member Author

We don't backport bug fixes to older versions, unless they're related to security.

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker P3 An issue that is relevant to core functions, but does not impede progress. Important, but not urgent target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(MatSelect): Select has more options active
3 participants