© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filament•13mo ago•
3 replies
ddoddsr

Livewire::make() return value?

I use Livewire Component in a Filament form to select some text I need in the form.
How do I get the data back to the form?
Livewire::make(ViewResponses::class, function(GET $get) {
    return ['record' => $get('client_id')];
}),
Livewire::make(ViewResponses::class, function(GET $get) {
    return ['record' => $get('client_id')];
}),

In the ViewResponses we select the response text.
It this point I can log it.
->actions([
    \Filament\Tables\Actions\Action::make('select')
        ->action(function (Responses $record ): void {
            logger( $record->response);
        }),
    ], position: ActionsPosition::BeforeColumns
)
->actions([
    \Filament\Tables\Actions\Action::make('select')
        ->action(function (Responses $record ): void {
            logger( $record->response);
        }),
    ], position: ActionsPosition::BeforeColumns
)

Is there any way to ge the value from the livewire component and use it in the calling form?
Solution
Looks like I can use
$this->dispatch('response-selected', response: $record->response);
$this->dispatch('response-selected', response: $record->response);
along with
#[On('response-selected')]
public function updatePostList($response)
{
   $this->message_text = $response;
   // logger($response);
}
#[On('response-selected')]
public function updatePostList($response)
{
   $this->message_text = $response;
   // logger($response);
}
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

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Livewire Component return null
FilamentFFilament / ❓┊help
2y ago
How to change Livewire Value
FilamentFFilament / ❓┊help
2y ago
triggering action make custom livewire error ?
FilamentFFilament / ❓┊help
8mo ago
call livewire component from view::make()
FilamentFFilament / ❓┊help
3y ago