SUMMARIZER USING CUSTOM DATA
I have a table with a personal data source based on an array. One of the columns is numeric, and when I implement a summarizer, it only calculates the records on the page for the grand total. Any guidance?
My summarizer code:
protected function getSolicitadoSummarizer(): Summarizer
{
return Summarizer::make()
->label('Total Solicitado')
->using(function (Component $livewire): float {
return $livewire->getTableRecords()->sum('CantidadSolicitada');
});
}
2 Replies
Maybe this is wrong:
it should be:
use
self not Component in function (self $livewire):Thanks for taking the time to reply, Will, but the problem remains: the total per page and the grand total show the same value on each page.