cpbret
Distinct Table Count
Adding distinct() makes it to the count query, but the column does not. Is there a different way?
TextColumn::make('responses_count')->counts([
'responses' => fn ($query) => $query->distinct('request_id')
])
->label('Responses')
SELECT DISTINCT count(*) FROM
responses
WHERE churches
.id
= responses
.church_id
and responses
.TYPE
= 1) AS responses_count
FROM churches
4 replies
Table Builder - First custom row not reloading when filters update
I'm using table builder to show custom html rows that contain a single livewire component each. On page load, everything loads fine. On pagination or refreshing filters, all rows EXCEPT the first row update and show fine.
It doesn't look to be data related.. because skipping the first item in the query causes the previously second item to get stuck in a loading state. I'm using wire:key="$getRecord()->id", and it seems to be working because everything else reloads fine. It almost feels like rows > index 0 are refreshed differently. I'm having a hard time locating the responsible code in the Filament repo. Thanks
1 replies