Bug: Datepicker value change event fires when changing min value of it
まだ誰も着手していません。
- 主要言語
- TypeScript
- スター
- 25k
- フォーク
- 6.8k
- 平均マージ
- 1日 8時間
- マージ済み PR(30日)
- 91
説明
Bug, feature request, or proposal:
Bug
What is the expected behavior?
I am not sure it is expected to behave like that or not, but I think that changing min value of datepicker shouldn't fire value changes event of the form group. I changed value of min date inside subscribe method because I want to have mindate dynamically updated. I checked two conditions one with the formgroup where it happens twice all the time and another condition using just formcontrol this issue happens only first time.
If I comment out the update of the mindate inside subscribe everything will be okay
What is the current behavior?
Form Group value change happens when changing Datepicker min value via two way binding, Min value update happens inside Subscribe method. This issue causes to fire valuechanges twice
What are the steps to reproduce?
Reproduction is StackBlitz using the formgroup
https://stackblitz.com/edit/datepicker-min-date-bug?file=app/datepicker-min-max-example.ts
What is the use-case or motivation for changing an existing behavior?
I think something is odd because different conditions behave differently ( for example as I stated above about formcontrol vs formgroup)
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular Material 5.0.0-rc3
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
Issue にリンクされている StackBlitz の再現を、app/datepicker-min-max-example.ts とその form-group および form-control のケースから実行します。subscription 内で datepicker の min 値を更新したときの value-change の emission を比較します。動作に一貫性があり、意図しない重複した emission が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- angular, typescript
- 領域
- frontend
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 48/100