Open titaii2 opened 2 years ago
Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me
@mattlewis92 ?
I think your issue here is that you're not creating a new reference to the events array when updating the meta object. Angular doesn't deep check objects for differences for performance reasons and adding that to the calendar would seriously affect performance when you have a large number of events. Doing something as simple as:
this.events = [...this.events];
When you update the meta properties should be enough to create a new reference and trigger change detection. Let me know if that works for you!
Is your feature request related to a problem? Please describe
The calendar doesn't refresh when changing some meta properties after calling this.refresh.next().
Describe the solution you'd like
Trigger the function refreshBody of calendar when at least 1 meta property has changed.
Describe your use case for implementing this feature
I'm using a CustomEventTitleFormatter to add an image directly for each event I create. I pass the image URL in the meta properties and when the URL changes (and by triggering this.refresh.next()), I would like the calendar being updated too. My case only concern body because I'm only using CustomEventTitleFormatter.
Additional context
I think changes detection is happening here so change.events should includes meta properties changes too.