Skip to content

Commit da954f3

Browse files
committed
Fix: Invalid Media Library Actions
1 parent 97e2fb0 commit da954f3

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/MediaLibrary/Concerns/HasItemActions.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,9 @@ protected function getMediaItemActions(): array
5656

5757
public function getVisibleMediaItemActions(): array
5858
{
59-
return array_filter(
60-
$this->getMediaItemActions(),
61-
fn (Action | ActionGroup $action): bool => $action->isVisible(),
62-
);
59+
// Return cached (configured) actions so that record-based visibility
60+
// closures are evaluated per-item in the view (actions.blade.php).
61+
return array_values($this->cachedMediaItemActions);
6362
}
6463

6564
/**

0 commit comments

Comments
 (0)