ViewColumn does not open modal with Modal Blade component

As in the docs, I have a ViewColumn:

use Filament\Tables\Columns\ViewColumn;
 
ViewColumn::make('status')->view('custom-view')


Within that View I have:
<x-filament::modal>
    <x-slot name="trigger">
        <x-filament::button>
            Open modal
        </x-filament::button>
    </x-slot>
 
    {{-- Modal content --}}
</x-filament::modal>


This is enough to render a modal anywhere within a form using ViewField. However, when trying to do this in a ViewColumn, I'm getting the following error:

Alpine Expression Error: isOpen is not defined

___

I would usually run this in an action, but I am unable to run any custom js within the action. Anything within script tags in a custom view do not execute.

E.g.

Tables\Actions\Action::make('myAction')
->requiresConfirmation()
->form([
    ViewField::make('name')
        ->view('test'),
])


// test.blade.php
<script>
console.log('here') // this is ignored

function test() { 
    console.log('hello world') // never gets called
}
</script>

<button onclick="test">Click!</button> // renders fine


Does anyone know why this is the case on either issue and how I can fix? (Screenshot is of first issue, referencing ViewColumn modal)
Screenshot_2023-11-01_at_13.14.52.png
Was this page helpful?