Closed mcalmus closed 4 years ago
I'm only seeing the setters being run twice with the provided code running against the latest date-range
branch version. Are you sure that you weren't looking at the getters?
Turns out my get method was doing something like:
return new Date(this._to);
so there was a new object every time.
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.
Reproduction
Use StackBlitz to reproduce your issue: https://stackblitz.com/fork/components-issue
This is related to the pre-release date range picker
html:
TypeScript: private _to: Date; private _from: Date; set toDate(newDate: Date) { console.log("set to date"); this._to = newDate; } get toDate(): Date { return this._to; } ...etc.
Steps to reproduce:
Expected Behavior
What behavior were you expecting to see?
setters called once (maybe twice) during startup
Actual Behavior
What behavior did you actually see?
Set is called dozens (maybe hundreds?) of times.
Environment