Skip to content

Commit 20932a9

Browse files
author
Ihor Melnychenko
committed
MAGETWO-45294: JS error on creditmemo view grid during export to CSV
1 parent e59b03b commit 20932a9

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

app/code/Magento/Sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
<exportButton name="export_button">
6464
<argument name="data" xsi:type="array">
6565
<item name="config" xsi:type="array">
66-
<item name="selectProvider" xsi:type="string">sales_order_view_creditmemo_grid.sales_order_view_creditmemo_grid.sales_order_view_creditmemo_columns.ids</item>
66+
<item name="selectProvider" xsi:type="string">sales_order_view_creditmemo_grid.sales_order_view_creditmemo_grid.sales_order_creditmemo_columns.ids</item>
6767
</item>
6868
</argument>
6969
</exportButton>

app/code/Magento/Ui/view/base/web/js/grid/export.js

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,8 @@ define([
66
'jquery',
77
'underscore',
88
'uiElement',
9-
'Magento_Ui/js/modal/alert',
109
'mage/translate'
11-
], function ($, _, Element, alert) {
10+
], function ($, _, Element) {
1211
'use strict';
1312

1413
return Element.extend({
@@ -73,23 +72,15 @@ define([
7372
},
7473

7574
buildOptionUrl: function (option) {
76-
var params = this.getParams();
77-
78-
return params ? option.url + '?' + $.param(params) : '';
75+
return option.url + '?' + $.param(this.getParams());
7976
},
8077

8178
applyOption: function () {
8279
var option = this.getActiveOption(),
8380
url = this.buildOptionUrl(option);
8481

85-
if (url) {
86-
location.href = url;
87-
} else {
88-
alert({
89-
title: this.title,
90-
content: this.message
91-
});
92-
}
82+
location.href = url;
83+
9384
}
9485
});
9586
});

0 commit comments

Comments
 (0)