Skip to content

Commit c8c04c5

Browse files
committed
Merge remote-tracking branch 'vanilla/MAGETWO-44562' into MAGETWO-44464
2 parents 17f5a13 + 64b55e6 commit c8c04c5

File tree

1 file changed

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

1 file changed

+4
-27
lines changed

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

Lines changed: 4 additions & 27 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
@@ -69,7 +46,7 @@ define([
6946

7047
registry.set('position_cache_valid', true);
7148

72-
if (this.selected().length === this.selectedData.length && positionCacheValid) {
49+
if (this.selectedData.length === 0 || positionCacheValid) {
7350
return;
7451
}
7552
// Check selected data
@@ -88,7 +65,7 @@ define([
8865

8966
/**
9067
* Show/hide action in the massaction menu
91-
* @param {Integer} actionId
68+
* @param {Number} actionId
9269
* @returns {Boolean}
9370
*/
9471
isActionRelevant: function (actionId) {
@@ -111,7 +88,7 @@ define([
11188
* Updates values of the 'allSelected'
11289
* and 'indetermine' properties.
11390
*
114-
* @returns {Multiselect} Chainable.
91+
* @returns {Object} Chainable.
11592
*/
11693
updateState: function () {
11794
var totalRecords = this.totalRecords(),

0 commit comments

Comments
 (0)