[英]FullCalendar eventReceive handler stays in memory somehow
我正在使用 HTML 加載 jQuery get()
,並在加載的內容中創建 FullCalendar (v5.10.2)。
If I load this HTML content (with my FullCalendar being initialized) multiple times, eventReceive
will also be called multiple times when I drop external events, as if the eventHandler for previous FullCalendar instances stays in memory despite the object being de-referenced.
因此,我查看了destroy()
並delete
以嘗試清除任何舊的 fullCalendar 數據。 調用命令時沒有錯誤,但仍然多次調用eventReceive
。 還嘗試尋找一些推薦的replace
,但仍然沒有運氣。
盡管在加載新的eventRecieve
之前手動調用了destroy()
,但之前 FullCalendar 實例的 eventRecieve 似乎仍然被觸發。 出於某種奇怪的原因,它似乎只適用於eventReceive
,而不適用於其他 eventHandler。 例如, eventDrop
和eventResize
都不會發生這種情況。
有人對此有任何想法嗎? 謝謝。
每次加載 FullCalendar 時,我都在創建new FullCalendar.Draggable()
。 我沒有意識到應該只做一次,然后它會自動將新元素轉換為可拖動的。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.