Open MathewBerg opened 2 years ago
I'm not sure if this is a bug. It happened after fixed issue (#20967).
@volvachev the bug lies in that I don't believe the filter should be executing if the datepicker is not opened since there should be nothing to filter out.
It's not the end of the world by any means, we can have a check where we used to not need one now.
Is this a regression?
The previous version in which this bug was not present was
9.2.0
Description
Adding a matDatepickerFilter onto a datepicker in 12.2.13 has the filter execute immediately along with a null value. I have not done a deep dive to see which version introduced this, we went from 9.x to 12.x and only noticed it when our testers raised a different issue.
Reproduction
12.2.13 with the extra log: https://stackblitz.com/edit/angular-11-material-reactive-starter-mfw6fz?file=src%2Fapp%2Fapp.component.ts
9.2.0 without the extra log: https://stackblitz.com/edit/angular-9-expression-changed-issue-8rykpo?file=src%2Fapp%2Fapp.component.ts
Expected Behavior
It shouldn't be firing since the datepicker has not been opened.
Actual Behavior
It fires, and with a value of null.
Environment