Skip to content

Commit

Permalink
fix: Unmounting table actions dispatches close-modal when modal is al…
Browse files Browse the repository at this point in the history
…ready closed
  • Loading branch information
wout-o committed Sep 10, 2024
1 parent 129943d commit cace6af
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Concerns/HasActions.php
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ protected function resetMountedTableActionProperties(): void
$this->mountedTableActionsData = [];
}

public function unmountTableAction(bool $shouldCancelParentActions = true): void
public function unmountTableAction(bool $shouldCancelParentActions = true, bool $shouldDispatchCloseModal = true): void
{
$action = $this->getMountedTableAction();

Expand All @@ -341,7 +341,9 @@ public function unmountTableAction(bool $shouldCancelParentActions = true): void
}

if (! count($this->mountedTableActions)) {
$this->closeTableActionModal();
if ($shouldDispatchCloseModal) {
$this->closeTableActionModal();
}

$action?->record(null);
$this->mountedTableActionRecord(null);
Expand Down

0 comments on commit cace6af

Please sign in to comment.