search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

"dp.events.update(dpEvent)" sometimes redraw all Events on a Calendar

Asked by Julien
1 day ago.

I have an issue on a specific page and I’m unable to find the cause. On the click of a button, I update the HTML of an Event on a Calendar. Something like:

const dpEvent: DayPilot.Event = dp.events.find((ev) => ev.id() === idToFind);
dpEvent.data.html = dpEvent.data.html + '<span>test</span>';
dp.events.update(dpEvent);

For some reasons, on that specific page, all the Events are redrawn on the Calendar when this code is ran so they all flicker! I have another page where I do something very similar and only the target Event is redrawn (perfect behavior).

Do you have an idea what could cause dp.events.update(dpEvent) to redraw all Events?

Note that it may certainly be something on my side. I’ll do more tests and try to isolate the issue as much as possible but, if you have any idea, it would be appreciated.

Comment posted by Julien
1 day ago.

I just realized that on my other page, where there is not flickering, even the modified Event itself doesn’t flicker… So I guess my issue is not “one Event redraw vs. all Events redraw“ but rather: “Why does the Events flicker in some situations?“.

Answer posted by Julien
1 day ago.

I close my browser, open it again and now it doesn’t flicker anymore! :-|
I guess we’ll never know…

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):