Skip to content

Commit a4df4ef

Browse files
committed
Render the row from the style.
1 parent a149a64 commit a4df4ef

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Plugin/views/filter/Selective.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public function init(ViewExecutable $view, DisplayPluginBase $display, array &$o
3939
parent::init($view, $display, $options);
4040

4141
$this->options['exposed'] = TRUE;
42+
$this->realField = $this->options['selective_display_field'];
4243
}
4344

4445
/**
@@ -359,13 +360,16 @@ protected function getOids() {
359360
$field->getValueOptions();
360361
}
361362

363+
$style = $display->getPlugin('style');
364+
362365
// Create array of objects for selector.
363366
$oids = [];
364367
foreach ($view_copy->result as $row) {
365368
$key = $field->getValue($row);
366369
$key = is_array($key) ? reset($key) : $key;
367370
// @todo This double escapes markup.
368-
$oids[$key] = SafeMarkup::checkPlain($field->render($row));
371+
$value = $style->getField($row->index, $field_id);
372+
$oids[$key] = SafeMarkup::checkPlain($value);
369373
}
370374

371375
// Sort values.

0 commit comments

Comments
 (0)