mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
hotfix: Action hidden check with other actions inside a group
This commit is contained in:
@@ -94,7 +94,7 @@ trait CanBeHidden
|
||||
|
||||
public function isHidden(): bool
|
||||
{
|
||||
if ($this->getGroup()?->isHidden()) {
|
||||
if ($this->getGroup()?->baseIsHidden()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,6 +31,15 @@ it('can call an action with data', function () {
|
||||
]);
|
||||
});
|
||||
|
||||
it('can call action inside group', function () {
|
||||
$post = Post::factory()->create();
|
||||
|
||||
livewire(PostsTable::class)
|
||||
->callTableAction('groupedDelete', $post);
|
||||
|
||||
assertSoftDeleted($post);
|
||||
});
|
||||
|
||||
it('can validate an action\'s data', function () {
|
||||
livewire(PostsTable::class)
|
||||
->callTableAction('data', data: [
|
||||
|
||||
@@ -149,6 +149,11 @@ class PostsTable extends Component implements HasForms, Tables\Contracts\HasTabl
|
||||
Tables\Actions\DeleteAction::make(),
|
||||
Tables\Actions\ForceDeleteAction::make(),
|
||||
Tables\Actions\RestoreAction::make(),
|
||||
Tables\Actions\ActionGroup::make([
|
||||
Tables\Actions\DeleteAction::make('groupedDelete'),
|
||||
Tables\Actions\ForceDeleteAction::make('groupedForceDelete'),
|
||||
Tables\Actions\RestoreAction::make('groupedRestore'),
|
||||
]),
|
||||
])
|
||||
->bulkActions([
|
||||
Tables\Actions\DeleteBulkAction::make(),
|
||||
|
||||
Reference in New Issue
Block a user