Skip to content

Commit 01dc78a

Browse files
authored
Merge pull request #82 from billmn/slideover-support
Added support for Slideover on modal
2 parents 0840a08 + 4a94ad9 commit 01dc78a

4 files changed

Lines changed: 10 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,7 @@ To customise the modal, override the following properties in your widget:
238238

239239
- `protected string $modalWidth`
240240
- `protected string $modalLabel`
241+
- `protected bool $modalSlideover`
241242

242243
The process of saving and editing the event is up to you, since this plugin does not rely on a Model to save the calendar events.
243244

resources/views/components/create-event-modal.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-filament::form wire:submit.prevent="onCreateEventSubmit">
2-
<x-filament::modal id="fullcalendar--create-event-modal" :width="$this->getModalWidth()">
2+
<x-filament::modal id="fullcalendar--create-event-modal" :width="$this->getModalWidth()" :slide-over="$this->getModalSlideover()">
33
<x-slot name="header">
44
<x-filament::modal.heading>
55
{{ $this->getCreateEventModalTitle() }}

resources/views/components/edit-event-modal.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<x-filament::form wire:submit.prevent="onEditEventSubmit">
2-
<x-filament::modal id="fullcalendar--edit-event-modal" :width="$this->getModalWidth()">
2+
<x-filament::modal id="fullcalendar--edit-event-modal" :width="$this->getModalWidth()" :slide-over="$this->getModalSlideover()">
33
<x-slot name="header">
44
<x-filament::modal.heading>
55
{{ $this->getEditEventModalTitle() }}

src/Widgets/Concerns/CanManageModals.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ trait CanManageModals
88

99
protected string $modalWidth = 'sm';
1010

11+
protected bool $modalSlideover = false;
12+
1113
protected function getModalLabel(): string
1214
{
1315
return $this->modalLabel;
@@ -18,6 +20,11 @@ protected function getModalWidth(): string
1820
return $this->modalWidth;
1921
}
2022

23+
protected function getModalSlideover(): bool
24+
{
25+
return $this->modalSlideover;
26+
}
27+
2128
public function isListeningCancelledEditModal(): bool
2229
{
2330
return in_array('cancelledFullcalendarEditEventModal', $this->getEventsBeingListenedFor());

0 commit comments

Comments
 (0)