Skip to content

Commit

Permalink
Grid Export rendered data is not reflecting in the exported File, Dis…
Browse files Browse the repository at this point in the history
…played ID instead of Rendered Label #25963.

Fixed case when options are configured via XML directly instead of providing a class.
  • Loading branch information
novikor committed Jan 24, 2020
1 parent 93793d8 commit c517f5f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/code/Magento/Ui/Model/Export/MetadataProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -256,9 +256,11 @@ protected function getColumnOptions(): array
$component = $this->filter->getComponent();
/** @var Column $columnComponent */
foreach ($this->getColumns($component) as $columnComponent) {
/** @var OptionSourceInterface $options */
if ($optionSource = $columnComponent->getData('options')) {
$options[$columnComponent->getName()] = $this->getOptionsArray($optionSource->toOptionArray());
if ($columnComponent->hasData('options')) {
$optionSource = $columnComponent->getData('options');
$optionsArray = $optionSource instanceof OptionSourceInterface ?
$optionSource->toOptionArray() : $optionSource;
$options[$columnComponent->getName()] = $this->getOptionsArray($optionsArray);
}
}

Expand Down

0 comments on commit c517f5f

Please sign in to comment.