F
Filament2mo ago
SOIX

Using infolist actions inside livewire component

Hello, i have an issue when trying to use infolist actions inside livewire component:
<?php

namespace App\Livewire;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Infolists\Components\Actions\Action;
use Filament\Infolists\Components\Section;
use Filament\Infolists\Concerns\InteractsWithInfolists;
use Filament\Infolists\Contracts\HasInfolists;
use Filament\Infolists\Infolist;
use Filament\Pages\Concerns\InteractsWithFormActions;
use Livewire\Component;

class Custom extends Component implements HasForms, HasInfolists
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithFormActions;

public function render()
{
return view('livewire.custom');
}

public function infolist(Infolist $infolist): Infolist
{
return $infolist->schema([
Section::make('test')
->headerActions([
Action::make('test2')
->form([
TextInput::make('test3')
])
->action(fn ($data) => dump($data))
])
]);
}
}
<?php

namespace App\Livewire;

use Filament\Forms\Components\TextInput;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Filament\Infolists\Components\Actions\Action;
use Filament\Infolists\Components\Section;
use Filament\Infolists\Concerns\InteractsWithInfolists;
use Filament\Infolists\Contracts\HasInfolists;
use Filament\Infolists\Infolist;
use Filament\Pages\Concerns\InteractsWithFormActions;
use Livewire\Component;

class Custom extends Component implements HasForms, HasInfolists
{
use InteractsWithInfolists;
use InteractsWithForms;
use InteractsWithFormActions;

public function render()
{
return view('livewire.custom');
}

public function infolist(Infolist $infolist): Infolist
{
return $infolist->schema([
Section::make('test')
->headerActions([
Action::make('test2')
->form([
TextInput::make('test3')
])
->action(fn ($data) => dump($data))
])
]);
}
}
When I do this I get: Uncaught Component not found: 2qC986qfFCNK6TbSNG8M In console. Any specific trait for actions inside infolist?
3 Replies
SOIX
SOIXOP2mo ago
Let me try doing it in fresh app
FL
FL5w ago
Having the same issue 😦
Want results from more Discord servers?
Add your server