Custom Modal Issue

I have been trying this for hours but not working, i want to create a livewire custom modal with filament form , i followed the docs well , but instead i got this error
Filament\Resources\Pages\ListRecords::form(): Argument #1 ($form) must be of type Filament\Forms\Form, Filament\Infolists\Infolist given, called in /Users/sadiqgoni/hotel-management/vendor/filament/infolists/src/Concerns/InteractsWithInfolists.php on line 56
and i have not put any infolist in my code
This is my OrderResource
     ->actions([
                Tables\Actions\EditAction::make(),
                Tables\Actions\ViewAction::make(),
                Tables\Actions\DeleteAction::make(),
                
                // Custom Action for the Payment Modal
                Action::make('openPaymentModal')
                    ->label('Make Payment')
                    ->icon('heroicon-o-banknotes')
                    ->modalHeading('Make Payment')
                    ->modalWidth('lg')
                    ->modalContent(fn (Order $record) => view('livewire.table-order-component', ['record' => $record]))
                    ->action(fn (Order $record) => null),
            ])


This is my 'App/Livewire'
class TableOrderComponent extends Component implements HasForms
{
    use InteractsWithForms;
    public function form(Form $form): Form
    {
        return $form
            ->schema([
                Select::make('paymentMethod')
                    ->label('Payment Method')
                    ->options([
                        'cash' => 'Cash',
                        'card' => 'Card',
                    ])
                    ->required(),]) 
    public function render()
    {
        return view('livewire.table-order-component');
    }
and my blade
<div>
    <form wire:submit.prevent="submit">
        {{ $this->form }}
        <button type="submit" class="btn btn-primary">
            Make Payment
        </button>
    </form>
</div>
Was this page helpful?