Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default Calendar Sources for renderCalendar + Cache Bugfix (Breaking Option) #456

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docs/advanced/dataview.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ renderCalendar(this.container, [[{start: new Date(), id: "id", title: "Now and f
```
````

Unfortunately, there's a bug on first render and you need to interact with the calendar by changing the week or view before it renders properly.
Copy link
Author

@jarekbird jarekbird May 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the cache had not been initialized, then the bug mentioned above would occur. This PR fixes this problem by conditionally initializing the cache as part of the renderCalendar() function.

This solution required setting the renderCalendar() function to be an async function because the cache initialization is async, which changes the public API. :/ Docs are updated to reflect this. This is a breaking change.


`renderCalendar()` includes all events from all event sources set in the global settings when no event sources aer passed in.

````
Expand Down