How to use custom column inside ViewAction

i created a custom column which im using in my table component.

https://filamentphp.com/docs/2.x/tables/columns/custom#view-column
In the docs, i understood that i can also use it inside a view action:
ViewAction::make()
    ->recordTitle(__('game'))
    ->label('')
    ->color('primary')
    ->tooltip(__('See game details'))
    ->modalHeading(__('See game'))
    ->mountUsing(function (\Filament\Forms\ComponentContainer $form, Game $record) {
        $record->load('createdBy');
        $record->load('winner');

        $form->fill($record->toArray());
    })
    ->form([
        Grid::make(4)
            ->schema([
                ViewColumn::make('result')
                    ->view('tables.columns.game-result-column')
                    ->translateLabel()
                ,
...


but im getting:
Filament\Forms\ComponentContainer::Filament\Forms\Concerns\{closure}(): Argument #1 ($component) must be of type Filament\Forms\Components\Component, Filament\Tables\Columns\ViewColumn given

in the line where i fill the form: $form->fill($record->toArray());

what should i do?
Was this page helpful?