Skip to content

Commit f26ae80

Browse files
authored
Merge pull request #7857 from magento-performance/ACPT-717
[Performance]: [Product Grid Limitations] Incorrect MassAction Selected Records Number
2 parents d7a4ddc + b086989 commit f26ae80

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ define([
4747

4848
imports: {
4949
totalRecords: '${ $.provider }:data.totalRecords',
50+
showTotalRecords: '${ $.provider }:data.showTotalRecords',
5051
rows: '${ $.provider }:data.items'
5152
},
5253

@@ -78,6 +79,7 @@ define([
7879
'allSelected',
7980
'indetermine',
8081
'totalRecords',
82+
'showTotalRecords',
8183
'rows'
8284
]);
8385

@@ -345,6 +347,7 @@ define([
345347
excluded: this.excluded(),
346348
selected: this.selected(),
347349
total: this.totalSelected(),
350+
showTotalRecords: this.showTotalRecords(),
348351
excludeMode: this.excludeMode(),
349352
params: this.getFiltering()
350353
};

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,9 @@ define([
178178
var confirmData = action.confirm,
179179
data = this.getSelections(),
180180
total = data.total ? data.total : 0,
181-
confirmMessage = confirmData.message + ' (' + total + ' record' + (total > 1 ? 's' : '') + ')';
181+
confirmMessage = confirmData.message + (data.showTotalRecords || data.showTotalRecords === undefined ?
182+
' (' + total + ' record' + (total > 1 ? 's' : '') + ')'
183+
: '');
182184

183185
confirm({
184186
title: confirmData.title,

0 commit comments

Comments
 (0)