John Petrucci Blu
John Petrucci Blu
FFilament
Created by John Petrucci Blu on 2/15/2024 in #❓┊help
Refresh table contents with Action
Hi guys, I've created a form with the input fields (start_date & end_date), a button with the "findAssets" Action and a livewire component that is the table for the results, but I don't know how can refresh table when clicking Search button and running query with parameters. Page Action Code: public function findAssets() { $args = $this->form->getState(); $start_date = Carbon::parse($args['start_date']); $end_date = Carbon::parse($args['end_date']); $results = Asset::findAvailableAssets($start_date, $end_date); dd($results); } View Code: <x-filament-panels::page> <div class="container w-1/2"> {{ $this->form }} <div class="my-4"> <x-filament::button wire:click="findAssets" color="info"> Search </x-filament::button> </div> </div> @livewire('custom-table') </x-filament-panels::page> Is there a way to send $results data to custom-table component or I should change approach?
3 replies