Skip to content
Snippets Groups Projects
Commit c8c04c5f authored by Volodymyr Kholoshenko's avatar Volodymyr Kholoshenko
Browse files

Merge remote-tracking branch 'vanilla/MAGETWO-44562' into MAGETWO-44464

parents 17f5a138 64b55e60
No related merge requests found
......@@ -28,36 +28,13 @@ define([
},
/**
* @param {Integer} id
* @param {Number} id
* @returns {*}
*/
getLabel: function (id) {
return this.selected.indexOf(id) !== -1 ? $t('On') : $t('Off');
},
/**
* Initializes components' static properties.
*
* @returns {Column} Chainable.
*/
initProperties: function () {
this.actions = [{
value: 'selectAll',
label: $t('Select All')
}, {
value: 'deselectAll',
label: $t('Deselect All')
}, {
value: 'selectPage',
label: $t('Select All on This Page')
}, {
value: 'deselectPage',
label: $t('Deselect All on This Page')
}];
return this._super();
},
/**
* Sets the ids for preselected elements
* @returns void
......@@ -69,7 +46,7 @@ define([
registry.set('position_cache_valid', true);
if (this.selected().length === this.selectedData.length && positionCacheValid) {
if (this.selectedData.length === 0 || positionCacheValid) {
return;
}
// Check selected data
......@@ -88,7 +65,7 @@ define([
/**
* Show/hide action in the massaction menu
* @param {Integer} actionId
* @param {Number} actionId
* @returns {Boolean}
*/
isActionRelevant: function (actionId) {
......@@ -111,7 +88,7 @@ define([
* Updates values of the 'allSelected'
* and 'indetermine' properties.
*
* @returns {Multiselect} Chainable.
* @returns {Object} Chainable.
*/
updateState: function () {
var totalRecords = this.totalRecords(),
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment