CreateAction not doing anything after click
Hello,
I am trying to add CreateAction to a custom page but when I click on the button it doesn't do anything, not even producing any js error.
View File:
the same works when I call this action from header actions.
could anyone please help me with this? Am I doing anything wrong here?
Thank You.
I am trying to add CreateAction to a custom page but when I click on the button it doesn't do anything, not even producing any js error.
public function createNewTrainingEvent(): Action{
return CreateAction::make()
->label('New Training Event')
->model(TrainingEvent::class)
->form(TrainingEventResource::getFormSchema());
}public function createNewTrainingEvent(): Action{
return CreateAction::make()
->label('New Training Event')
->model(TrainingEvent::class)
->form(TrainingEventResource::getFormSchema());
}View File:
<x-filament-panels::page>
<div id='calendar-container'>
<div class="grid md:grid-cols-12 sm:grid-cols-1">
<div class="md:col-span-4 col-span-12">
{{ $this->createNewTrainingEvent }}
<x-filament-actions::modals />
</div>
<div class="md:col-span-8 col-span-12 tdta_back_calendar" wire:ignore>
<div id='calendar'></div>
</div>
</div>
</div>
</x-filament-panels::page>
@push('scripts')
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.8/index.global.min.js'></script>
<script type="module">
// full calendar scripts here
</script>
@endpush<x-filament-panels::page>
<div id='calendar-container'>
<div class="grid md:grid-cols-12 sm:grid-cols-1">
<div class="md:col-span-4 col-span-12">
{{ $this->createNewTrainingEvent }}
<x-filament-actions::modals />
</div>
<div class="md:col-span-8 col-span-12 tdta_back_calendar" wire:ignore>
<div id='calendar'></div>
</div>
</div>
</div>
</x-filament-panels::page>
@push('scripts')
<script src='https://cdn.jsdelivr.net/npm/fullcalendar@6.1.8/index.global.min.js'></script>
<script type="module">
// full calendar scripts here
</script>
@endpushthe same works when I call this action from header actions.
protected function getHeaderActions(): array
{
return [
CreateAThe ction::make()
->label('New Training Event')
->model(TrainingEvent::class)
->form(TrainingEventResource::getFormSchema())
];
}protected function getHeaderActions(): array
{
return [
CreateAThe ction::make()
->label('New Training Event')
->model(TrainingEvent::class)
->form(TrainingEventResource::getFormSchema())
];
}could anyone please help me with this? Am I doing anything wrong here?
Thank You.