F
Filament17mo ago
Gorg

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
LeandroFerreira
LeandroFerreira17mo ago
are you using $livewire for something? I don't believe that wizard is the issue
Gorg
GorgOP17mo ago
Nope, only wizard..
LeandroFerreira
LeandroFerreira17mo ago
when you remove getSteps, the form works, right?
Gorg
GorgOP17mo ago
Yes, but i also need to remove HasWizard trait, and then work correct, when i added HasWizard - see problem
LeandroFerreira
LeandroFerreira17mo ago
what is the full namespace?
Gorg
GorgOP17mo ago
namespace App\Filament\Resources\TicketResource\Pages;
LeandroFerreira
LeandroFerreira17mo ago
HasWizard... use CreateRecord\Concerns\HasWizard;
Gorg
GorgOP17mo ago
Trait "CreateRecord\Concerns\HasWizard" not found, when i try use Filament\Resources\Pages\CreateRecord\Concerns\HasWizard; i see $livewire must not be....
LeandroFerreira
LeandroFerreira17mo ago
what is the Filament version?
Gorg
GorgOP17mo ago
v2.17.50
LeandroFerreira
LeandroFerreira17mo ago
Can you share the whole code please? Can you share the resource file as well?
Gorg
GorgOP17mo ago
I fixed this with: protected function getFormSchema(): array { return [ Wizard::make() ->schema([ Step::make('Choose Contract') ->schema([ ]), Step::make('Details') ->schema([]), ]) ]; }
LeandroFerreira
LeandroFerreira17mo ago
that doesn't make sense since you are using a resource
Want results from more Discord servers?
Add your server