Skip to content

Commit

Permalink
Fix applySummaries Column type
Browse files Browse the repository at this point in the history
cast array to column var so it has consistent type for defer_loading = true/false
  • Loading branch information
alloylab committed Dec 19, 2024
1 parent 97eb09d commit d31d8cb
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/DataSource/Processors/DataSourceBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,8 @@ protected function applySummaries(MorphToMany|EloquentBuilder|BaseCollection|Que

$this->component->columns = collect($this->component->columns)
->map(function (array|\stdClass|Column $column) use ($results, $applySummaryFormat) {
$column = (array) $column;

$field = strval(data_get($column, 'dataField')) ?: strval(data_get($column, 'field'));

$summaries = ['sum', 'count', 'avg', 'min', 'max'];
Expand Down

0 comments on commit d31d8cb

Please sign in to comment.