filament-fullcalendar
filament-fullcalendar copied to clipboard
Typed property Saade\FilamentFullCalendar\Widgets\FullCalendarWidget::$record must not be accessed before initialization
I have a filament action within headerActions method for the calendar.
It is using a modal form which I want to run to filter the events, the error appears when trying to submit that form. Any ideas on how to fix this would be much appreciated.
return [ Action::make('filter') ->label(__('ev-bookings.actions.filter-locations')) ->icon('heroicon-s-funnel') ->modalWidth('sm') ->modalIcon('heroicon-o-funnel') ->modalCancelAction(false) ->modalSubmitActionLabel(__('ev-bookings.actions.filter-locations')) ->modalFooterActionsAlignment('center') ->form([ CheckboxListColor::make('color') ->label(__('ev-bookings.fields.locations')) ->hiddenLabel(true) ->options($locations) ->required() ->columns(2) ]) ->action(function (array $data): void { // will do something }) ];
i'm having the same error when creating Events with additional data
this line gives this error : 'calendar_id' => $this->record->id