We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97e2fb0 commit da954f3Copy full SHA for da954f3
1 file changed
src/MediaLibrary/Concerns/HasItemActions.php
@@ -56,10 +56,9 @@ protected function getMediaItemActions(): array
56
57
public function getVisibleMediaItemActions(): array
58
{
59
- return array_filter(
60
- $this->getMediaItemActions(),
61
- fn (Action | ActionGroup $action): bool => $action->isVisible(),
62
- );
+ // Return cached (configured) actions so that record-based visibility
+ // closures are evaluated per-item in the view (actions.blade.php).
+ return array_values($this->cachedMediaItemActions);
63
}
64
65
/**
0 commit comments