© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•5mo ago•
4 replies
andis

Testing createOptionForm within an action

Whats the recommened way to test a createOptionForm within an action? I had this working in v3 but in v4 I get this error
Unable to set component data. Public property [$mountedFormComponentActionsData] not found on component
Unable to set component data. Public property [$mountedFormComponentActionsData] not found on component


livewire(Devices::class, ['folder' => $this->folder, 'account' => $this->client])
        ->mountAction('createDevice')
        ->call('mountFormComponentAction', 'mountedActionsData.0.device_manufacturer_id', 'createOption')
        ->set('mountedFormComponentActionsData.0.name', $newManufacturerName)
        ->callMountedFormComponentAction();
livewire(Devices::class, ['folder' => $this->folder, 'account' => $this->client])
        ->mountAction('createDevice')
        ->call('mountFormComponentAction', 'mountedActionsData.0.device_manufacturer_id', 'createOption')
        ->set('mountedFormComponentActionsData.0.name', $newManufacturerName)
        ->callMountedFormComponentAction();
Solution
This can be solved using the new
TestAction
TestAction
class introduced in V4.

livewire(Devices::class, ['folder' => $this->folder, 'account' => $this->client])
        ->mountAction('createDevice')
        ->mountAction(TestAction::make('createOption')->schemaComponent('device_manufacturer_id'))
        ->fillForm([
            'name' => $newManufacturerName,
        ])
        ->callMountedAction();
livewire(Devices::class, ['folder' => $this->folder, 'account' => $this->client])
        ->mountAction('createDevice')
        ->mountAction(TestAction::make('createOption')->schemaComponent('device_manufacturer_id'))
        ->fillForm([
            'name' => $newManufacturerName,
        ])
        ->callMountedAction();
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Testing actions defined within extraModalFooterActions()
FilamentFFilament / ❓┊help
2y ago
Accessing variables from within createOptionForm
FilamentFFilament / ❓┊help
3y ago
Action within Action->Slideover()
FilamentFFilament / ❓┊help
6mo ago
ActionGroups and Testing
FilamentFFilament / ❓┊help
17mo ago