Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

5.0.2 #104

Merged
merged 4 commits into from
Oct 8, 2022
Merged

5.0.2 #104

Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
WIP
  • Loading branch information
Okipa committed Oct 8, 2022
commit 66dbfe720010e2c3f24313569cc56a3b381acf33
6 changes: 6 additions & 0 deletions src/Livewire/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ public function rowAction(string $identifier, string $modelKey, bool $requiresCo
}
$rowActionArray = collect($rowActionsArray)->where('identifier', $identifier)->first();
$rowActionInstance = AbstractRowAction::make($rowActionArray);
if (! $rowActionInstance->isAllowed()) {
return null;
}
$model = app($rowActionArray['modelClass'])->findOrFail($modelKey);
if ($requiresConfirmation) {
return $this->emit(
Expand All @@ -318,6 +321,9 @@ public function rowAction(string $identifier, string $modelKey, bool $requiresCo
public function columnAction(string $identifier, string $modelKey, bool $requiresConfirmation): mixed
{
$columnActionArray = AbstractColumnAction::retrieve($this->tableColumnActionsArray, $modelKey, $identifier);
if (! $columnActionArray) {
return null;
}
$columnActionInstance = AbstractColumnAction::make($columnActionArray);
if (! $columnActionInstance->isAllowed()) {
return null;
Expand Down