Skip to content

Commit 6911691

Browse files
authored
Merge pull request #213 from einorler/aggregate_view_data_fix
updated choice view data class name in dynamic filters
2 parents 844abcc + d079241 commit 6911691

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Filter/Widget/Dynamic/DynamicAggregate.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public function getViewData(DocumentIterator $result, ViewData $data)
182182
}
183183

184184
$active = $this->isChoiceActive($bucket['key'], $data, $activeName);
185-
$choice = new ViewData\Choice();
185+
$choice = new ViewData\ChoiceAwareViewData();
186186
$choice->setLabel($bucket->getValue('key'));
187187
$choice->setCount($bucket['doc_count']);
188188
$choice->setActive($active);
@@ -358,7 +358,7 @@ protected function formInitialUnsortedChoices($result, $data)
358358

359359
foreach ($result->getAggregation($data->getName())->getAggregation('query') as $bucket) {
360360
$groupName = $bucket->getAggregation('name')->getBuckets()[0]['key'];
361-
$choice = new ViewData\Choice();
361+
$choice = new ViewData\ChoiceAwareViewData();
362362
$choice->setActive(false);
363363
$choice->setUrlParameters($urlParameters);
364364
$choice->setLabel($bucket['key']);

0 commit comments

Comments
 (0)