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
eventContent on official doc not working #7342
Comments
Confimed. I'll fix this in the next minor release. |
Similar to #7276 |
any idea when this will be fixed? |
I think bad global economy is influencing many open-source developer, no income means we need to do outsourced jobs instead of main open-source project. |
@krishna-koushik see tiddly-gittly/tiddlywiki-calendar@ee49df7 for workaround, also see https://github.com/tiddly-gittly/TidGi-Desktop for a local-first note app that use it. |
Awesome @linonetwo thank you very much |
Fixed in v6.1.9 Updated repro: |
@arshaw Not supporting arrays in v6 is an undocumented and unintentional breaking change and there's probably a bug somewhere, here's the facts :
So is it a bug ? A typing issue ? We have a bunch of code based on this implementation, and I don't want to start fixing the v6 issues if the problem is in FullCalendar, not in our code. Thank you in advance ! Edit: the change comes from this commit, previously, the default case was |
A simple suggestion to restore the v5 behavior with arrays, in https://github.com/fullcalendar/fullcalendar/blob/main/packages/core/src/content-inject/ContentInjector.ts -import { createElement, ComponentChild, JSX, Ref, isValidElement } from '../preact.js'
+import { createElement, ComponentChild, ComponentChildren, JSX, Ref, isValidElement } from '../preact.js'
import { CustomContentGenerator } from '../common/render-hook.js'
import { BaseComponent, setRef } from '../vdom-util.js'
import { guid } from '../util/misc.js'
@@ -45,7 +45,7 @@ export class ContentInjector<RenderProps> extends BaseComponent<ContentInjectorP
const { customGenerator, defaultGenerator, renderProps } = props
const attrs = buildElAttrs(props, [], this.handleEl)
let useDefault = false
- let innerContent: ComponentChild | undefined
+ let innerContent: ComponentChildren | undefined
let queuedDomNodes: Node[] = []
let currentGeneratorMeta: any
@@ -57,7 +57,7 @@ export class ContentInjector<RenderProps> extends BaseComponent<ContentInjectorP
if (customGeneratorRes === true) {
useDefault = true
} else {
- const isObject = customGeneratorRes && typeof customGeneratorRes === 'object' // non-null
+ const isObject = customGeneratorRes && typeof customGeneratorRes === 'object' && !Array.isArray(customGeneratorRes) // non-null / non-array
if (isObject && ('html' in customGeneratorRes)) {
attrs.dangerouslySetInnerHTML = { __html: customGeneratorRes.html }
|
Reduced Test Case
https://codepen.io/linonetwo/pen/ExdMrWy?editors=001
Do you understand that if a reduced test case is not provided, we will intentionally delay triaging of your ticket?
Which connector are you using (React/Angular/etc)?
No connector (vanilla JS)
Bug Description
This works in 6.0.2 , but not work after upgrade to 6.1.8
Can't sure which version causes this, because when try to downgrade to 6.1.0 to bysect, it errors about
@fullcalendar/premium-common@6.1.8 can't find preact.js
or something.The text was updated successfully, but these errors were encountered: