Skip to content

Commit 0e3a9ad

Browse files
committed
Fix
1 parent 5d34c76 commit 0e3a9ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ActiveDataProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,9 @@ protected function prepareModels()
122122

123123
if (is_array(($results = $query->search($this->db)))) {
124124
$this->setQueryResults($results);
125+
if ($pagination !== false) {
126+
$pagination->totalCount = $this->getTotalCount();
127+
}
125128
return $results['hits']['hits'];
126129
}
127130
$this->setQueryResults([]);
@@ -138,9 +141,6 @@ protected function prepareTotalCount()
138141
}
139142

140143
$results = $this->getQueryResults();
141-
142-
var_dump($results);
143-
144144
if (isset($results['hits']['total'])) {
145145
return is_array($results['hits']['total']) ? (int) $results['hits']['total']['value'] : (int) $results['hits']['total'];
146146
}

0 commit comments

Comments
 (0)