Skip to content

Commit

Permalink
fix checkbox
Browse files Browse the repository at this point in the history
  • Loading branch information
luanfreitasdev committed Sep 20, 2023
1 parent 36c6d3a commit 40b2114
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Traits/WithCheckbox.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ public function selectCheckboxAll(): void

/** @phpstan-ignore-next-line */
collect($data->items())->each(function (array|Model|\stdClass $model) use ($actionRulesClass) {
$rules = $actionRulesClass->recoverFromAction($model);
$rules = $actionRulesClass->recoverFromAction($model, 'pg:checkbox');

if (isset($rules['hide']) || isset($rules['disable'])) {
if (filled($rules['hide']) || filled($rules['disable'])) {
return;
}

$value = $model->{$this->checkboxAttribute};

if (!in_array($value, $this->checkboxValues)) {
Expand Down

0 comments on commit 40b2114

Please sign in to comment.