Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

feat(autocomplete): allow configuring requireSelection blur behavior without resetting value to null

オープン
#32,953 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
静か
技術スタック
angular, typescript
領域
frontend

調査の方向性

まず、Angular autocomplete の requireSelection における blur の動作と、panel が閉じたときに valueChanges がどのように発行されるかを追跡します。既存の制約について、関連する issue #27767 と #28590 を確認してください。完了条件は、アプリケーションが blur によって以前の選択を保持するか null を発行するかを設定でき、明示的なクリアを区別できることです。

索引モデルが issue の本文から書いたものです。

説明

area: material/autocomplete feature P3
Feature Description

Please add a configurable option such as preserving the previous selection on blur, so that requireSelection does not have to emit null unless the application explicitly wants that behavior.

Related issues:

  • #27767: requireSelection clears input on blur
  • #28590: [requireSelection]="true" breaks valueChanges
Use Case

In our case, we manually restore the previous selected value when Angular resets the control to null.

That workaround causes multiple valueChanges emissions for a single user interaction: first null, then the previously selected value after we restore it. This is noisy, annoying to handle, and not reliably distinguishable from a real clear action triggered by the user.

We want to detect an actual clear action separately from the case where the user only focuses the input, opens the autocomplete panel, and then blurs without selecting a new option. A configurable behavior here would prevent unnecessary state changes and extra reactive form events.

主要言語
TypeScript
スター
25k
フォーク
6.8k
平均マージ
1日 1時間
マージ済み PR(30日)
84

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

angular/components のほかの issue

angular/components の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。