Power-Components / livewire-powergrid

⚡ PowerGrid generates modern, powerful and easy-to-customize data tables using Laravel Livewire.
https://livewire-powergrid.com
MIT License
1.41k stars 206 forks source link

Column Summary Doesn't work when using Collections. #1557

Closed luanfreitasdev closed 1 month ago

luanfreitasdev commented 1 month ago

Discussed in https://github.com/Power-Components/livewire-powergrid/discussions/1554

Originally posted by **abhaypithadiya** May 16, 2024 I have a datasource which returns a collection. ``` public function datasource(): ?Collection { return $this->productCollection; } ``` When I use any column summary it doesn't display. ``` Column::make('Gross Wt', 'gross_wt') ->withSum('Total Gross Wt', true, false) ->searchable() ->sortable(), ``` Does this feature only work for Eloquent? I couldn't find anything in the documentation.
luanfreitasdev commented 1 month ago

Fixed: https://github.com/Power-Components/livewire-powergrid/releases/tag/v5.6.4