Typed property Filament\Pages\Actions\Action::$livewire must not be accessed before initialization
When i try to create form wizard, i see this error.
My code:
use HasWizard;
protected static string $resource = TicketResource::class;
protected function getSteps(): array
{
return [
Step::make('Choose Contract')
->schema([
Select::make('contract_id')
->columnSpan(2)
->relationship('contract', 'created_at')
]),
];
}
Thanks!
13 Replies
are you using $livewire for something?
I don't believe that wizard is the issue
Nope, only wizard..
when you remove getSteps, the form works, right?
Yes, but i also need to remove HasWizard trait, and then work correct, when i added HasWizard - see problem
what is the full namespace?
namespace App\Filament\Resources\TicketResource\Pages;
HasWizard...
use CreateRecord\Concerns\HasWizard;
Trait "CreateRecord\Concerns\HasWizard" not found, when i try use Filament\Resources\Pages\CreateRecord\Concerns\HasWizard; i see $livewire must not be....
what is the Filament version?
v2.17.50
Can you share the whole code please? Can you share the resource file as well?
I fixed this with:
protected function getFormSchema(): array
{
return [
Wizard::make()
->schema([
Step::make('Choose Contract')
->schema([
]),
Step::make('Details')
->schema([]),
])
];
}
that doesn't make sense since you are using a resource