Skip to content

Commit b00978e

Browse files
committed
MAGETWO-44562: Add products: 'Select All on This Page' is not displayed, 'Select All' selects only products on the current page
1 parent 23f840e commit b00978e

File tree

1 file changed

+5
-29
lines changed
  • app/code/Magento/Ui/view/base/web/js/grid/columns

1 file changed

+5
-29
lines changed

app/code/Magento/Ui/view/base/web/js/grid/columns/onoff.js

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -28,36 +28,13 @@ define([
2828
},
2929

3030
/**
31-
* @param {Integer} id
31+
* @param {Number} id
3232
* @returns {*}
3333
*/
3434
getLabel: function (id) {
3535
return this.selected.indexOf(id) !== -1 ? $t('On') : $t('Off');
3636
},
3737

38-
/**
39-
* Initializes components' static properties.
40-
*
41-
* @returns {Column} Chainable.
42-
*/
43-
initProperties: function () {
44-
this.actions = [{
45-
value: 'selectAll',
46-
label: $t('Select All')
47-
}, {
48-
value: 'deselectAll',
49-
label: $t('Deselect All')
50-
}, {
51-
value: 'selectPage',
52-
label: $t('Select All on This Page')
53-
}, {
54-
value: 'deselectPage',
55-
label: $t('Deselect All on This Page')
56-
}];
57-
58-
return this._super();
59-
},
60-
6138
/**
6239
* Sets the ids for preselected elements
6340
* @returns void
@@ -67,11 +44,10 @@ define([
6744
key,
6845
i;
6946

70-
registry.set('position_cache_valid', true);
71-
72-
if (this.selected().length === this.selectedData.length && positionCacheValid) {
47+
if (this.selectedData.length === 0 || positionCacheValid) {
7348
return;
7449
}
50+
registry.set('position_cache_valid', true);
7551
// Check selected data
7652
for (key in this.selectedData) {
7753
if (this.selectedData.hasOwnProperty(key) && this.selected().indexOf(key) === -1) {
@@ -87,7 +63,7 @@ define([
8763

8864
/**
8965
* Show/hide action in the massaction menu
90-
* @param {Integer} actionId
66+
* @param {Number} actionId
9167
* @returns {Boolean}
9268
*/
9369
isActionRelevant: function (actionId) {
@@ -110,7 +86,7 @@ define([
11086
* Updates values of the 'allSelected'
11187
* and 'indetermine' properties.
11288
*
113-
* @returns {Multiselect} Chainable.
89+
* @returns {Object} Chainable.
11490
*/
11591
updateState: function () {
11692
var totalRecords = this.totalRecords(),

0 commit comments

Comments
 (0)