I've changed a little bit their Codepen moving the tooltip function to the function eventTooltip(info) and in the FullCalendar configuration I've changed the eventDidMount render hook to eventDidMount: eventTooltip. And it works fine: https://codepen.io/cawecoy/pen/jOJgjay
So, I want to implement it through this Filament plugin. That's what I did:
public function panel(Panel $panel): Panel
{
return $panel->plugins([
FilamentFullCalendarPlugin::make()->config(['eventDidMount' => 'eventTooltip']),
]);
}
I have the function eventTooltip(info) in a JS file that is loaded perfectly.
But it's not working.
The events are not even displayed on the calendar (they were being displayed before I added ['eventDidMount' => 'eventTooltip'] to the plugin ->config()):
I can see that the plugin config is loaded in the HTML:
I see my config here: JSON.parse('{\u0022eventDidMount\u0022:\u0022eventTooltip\u0022}')
So how can I use eventDidMount through this plugin?
I guess that config is redered as string like "eventDidMount": "eventTooltip", but for this config to work it should be rendered like "eventDidMount": eventTooltip.
Or maybe this plugin can have a dedicated method to Event Render Hooks (only for functions then rendered in Javascript always without quotes), as we have for locale, timezone, and so on. Then we just do:
public function panel(Panel $panel): Panel
{
return $panel->plugins([
FilamentFullCalendarPlugin::make()->renderHooks(['eventDidMount' => 'eventTooltip']),
]);
}
Hi. I am developing the event tooltip with eventDidMount and Tooltip.js like in the official FullCalendar Demo
I've changed a little bit their Codepen moving the tooltip function to the
function eventTooltip(info)
and in the FullCalendar configuration I've changed theeventDidMount
render hook toeventDidMount: eventTooltip
. And it works fine: https://codepen.io/cawecoy/pen/jOJgjaySo, I want to implement it through this Filament plugin. That's what I did:
I have the
function eventTooltip(info)
in a JS file that is loaded perfectly.But it's not working.
The events are not even displayed on the calendar (they were being displayed before I added
['eventDidMount' => 'eventTooltip']
to the plugin->config()
):I can see that the plugin config is loaded in the HTML:
I see my config here:
JSON.parse('{\u0022eventDidMount\u0022:\u0022eventTooltip\u0022}')
So how can I use eventDidMount through this plugin?
I guess that config is redered as string like
"eventDidMount": "eventTooltip"
, but for this config to work it should be rendered like"eventDidMount": eventTooltip
.Or maybe this plugin can have a dedicated method to Event Render Hooks (only for functions then rendered in Javascript always without quotes), as we have for
locale
,timezone
, and so on. Then we just do:I might try to send a PR. Let me know.