From d31d8cbf6c1b5625e7c8de81bae7631914871ad4 Mon Sep 17 00:00:00 2001 From: alloylab Date: Thu, 19 Dec 2024 09:36:50 -0600 Subject: [PATCH] Fix applySummaries Column type cast array to column var so it has consistent type for defer_loading = true/false --- src/DataSource/Processors/DataSourceBase.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/DataSource/Processors/DataSourceBase.php b/src/DataSource/Processors/DataSourceBase.php index 77469a1e..5070daeb 100644 --- a/src/DataSource/Processors/DataSourceBase.php +++ b/src/DataSource/Processors/DataSourceBase.php @@ -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'];