Matt Jenkins
Matt Jenkins
FFilament
Created by Matt Jenkins on 12/15/2023 in #❓┊help
Component not firing events in some render hooks
ok, so I have managed to get it working by just wrapping the button in a div, it seems as though it doesn't work when it is the root element!?
<div>
<x-filament::button wire:click="publishStaff">
{{$label}}
</x-filament::button>
</div>
<div>
<x-filament::button wire:click="publishStaff">
{{$label}}
</x-filament::button>
</div>
5 replies
FFilament
Created by Matt Jenkins on 12/15/2023 in #❓┊help
Component not firing events in some render hooks
Also, I have no idea why I have to dispatch an event at all, i would have thought I could just use wire:click='publishStaff' from the component but this seems to be called agains the x-filament::button itself
5 replies
FFilament
Created by HL on 10/24/2023 in #❓┊help
Modify SelectFilter query based on another SelectFilters value (Dependent Filters)
Fantastic, I'd actually gone down that road before but completely forgot.
14 replies
FFilament
Created by HL on 10/24/2023 in #❓┊help
Modify SelectFilter query based on another SelectFilters value (Dependent Filters)
I'm after the same thing, did you ever find a solution to this?
14 replies
FFilament
Created by Matt Jenkins on 10/6/2023 in #❓┊help
Refresh a table when notification received
So I realised I can listen for a broadcast notification on the resource list class and then do something to the table to refresh it. My solution was to just set the tableSearch to itself which seems to work but feels a bit hacky
public function getListeners(): array
{
$user_id = auth()->user()->id;

return [
"echo-private:import.user.{$user_id},ImportComplete" => 'refreshTable'
];
}

public function refreshTable()
{
$this->tableSearch = $this->tableSearch;
}
public function getListeners(): array
{
$user_id = auth()->user()->id;

return [
"echo-private:import.user.{$user_id},ImportComplete" => 'refreshTable'
];
}

public function refreshTable()
{
$this->tableSearch = $this->tableSearch;
}
5 replies
FFilament
Created by Jacques on 8/3/2023 in #❓┊help
Notify User of unsaved data
Did you ever get anywhere with this?
10 replies
FFilament
Created by JohnnyC on 4/19/2023 in #❓┊help
Use another client that Pusher with Websocket
Just adding to this as it helped me find a solution for filament v3. You need to first uncomment App\Providers\BroadcastServiceProvider::class in config/app.php and also comment out authEndpoint in config/filament.php so it looks something like this:
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
//'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
],

],
'broadcasting' => [

'echo' => [
'broadcaster' => 'pusher',
'key' => env('VITE_PUSHER_APP_KEY'),
'cluster' => env('VITE_PUSHER_APP_CLUSTER'),
'wsHost' => env('VITE_PUSHER_HOST'),
'wsPort' => env('VITE_PUSHER_PORT'),
'wssPort' => env('VITE_PUSHER_PORT'),
//'authEndpoint' => '/api/v1/broadcasting/auth',
'disableStats' => true,
'encrypted' => true,
],

],
Not sure why the endpoint is set to that and I may be missing something but this worked for me, locally at least!
10 replies