Skip to content

Commit c517f5f

Browse files
committed
Grid Export rendered data is not reflecting in the exported File, Displayed ID instead of Rendered Label #25963.
Fixed case when options are configured via XML directly instead of providing a class.
1 parent 93793d8 commit c517f5f

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

app/code/Magento/Ui/Model/Export/MetadataProvider.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,11 @@ protected function getColumnOptions(): array
256256
$component = $this->filter->getComponent();
257257
/** @var Column $columnComponent */
258258
foreach ($this->getColumns($component) as $columnComponent) {
259-
/** @var OptionSourceInterface $options */
260-
if ($optionSource = $columnComponent->getData('options')) {
261-
$options[$columnComponent->getName()] = $this->getOptionsArray($optionSource->toOptionArray());
259+
if ($columnComponent->hasData('options')) {
260+
$optionSource = $columnComponent->getData('options');
261+
$optionsArray = $optionSource instanceof OptionSourceInterface ?
262+
$optionSource->toOptionArray() : $optionSource;
263+
$options[$columnComponent->getName()] = $this->getOptionsArray($optionsArray);
262264
}
263265
}
264266

0 commit comments

Comments
 (0)