question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Event rendering cannot be cancelled from eventContent

See original GitHub issue

Reported in https://fullcalendar.freshdesk.com/a/tickets/1936

The v5 migration doc mentions a replacement for returning false from eventRender is to “attach a display:‘none’ property on the Event Input” from eventContent but that seems to have no effect.

https://codepen.io/acerix/pen/KKVaMXa?editors=001

https://fullcalendar.io/docs/v5/upgrading-from-v4#event-rendering

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:9 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
arshawcommented, Jun 22, 2020

apologies, that won’t work either because an array event source is not considered ‘refetchable’ because it’s a static source.

Move our filtering logic “up a level” to an events function will work. Please see what I did here: https://codepen.io/arshaw/pen/KKVmVKa?editors=0010

Does that work for you?

1reaction
arshawcommented, Jun 18, 2020

I’ll clear up the docs. What I meant from the docs is that if you already have a display property on your event object set to 'none', before eventContent is called, then it won’t display.

When eventContent is executing, it’s already too late.

You’ll need to do it imperatively at the time the user indicates what they wan’t filtered out. Here’s an example:

https://codepen.io/arshaw/pen/oNbBLKr?editors=0010

event.setProp('display', 'none')
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to filter events in the new v5 of Fullcalendar.io
eventContent - for if you injected DOM content via eventRender. You cannot cancel rendering by returning false however.
Read more >
Event Render Hooks - Docs - FullCalendar
If the event data changes, this is NOT called again. eventWillUnmount - called right before the element will be removed from the DOM....
Read more >
@fullcalendar/react - npm
Render a FullCalendar component, supplying options as props: ... from '@fullcalendar/daygrid' const events = [ { title: 'Meeting', ...
Read more >
Chapter 2 - Defining Event Content Fragment Models
Any existing Content Fragment Models created under this configuration is deleted as well as their definitions are stored under /conf/wknd-mobile ...
Read more >
Responsive event calendar documentation for React | Mobiscroll
Customize the event content - Mobiscroll takes care of rendering the events in the ... The calendar cannot be navigated beyond the specified...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found