Skip to content

Commit e5a2cdb

Browse files
MAGETWO-71835: [Product grid] SC's values aren't sorted alphabetically in the tooltip
- Sort values case insensitive
1 parent fad6db4 commit e5a2cdb

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ define([
6868
});
6969

7070
return labels.sort(
71-
function (a, b) {
72-
return a.toLowerCase().localeCompare(b.toLowerCase());
71+
function (labelFirst, labelSecond) {
72+
return labelFirst.toLowerCase().localeCompare(labelSecond.toLowerCase());
7373
}
7474
);
7575
},

dev/tests/js/jasmine/tests/app/code/Magento/Ui/base/js/grid/columns/expandable.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ define([
7272

7373
describe('getLabelsArray method', function () {
7474
it('check if label array sort alphabetically case insensitive', function () {
75-
record['shared_catalog'].push(1, 2 , 3);
75+
record['shared_catalog'].push(1, 2, 3);
7676
expandable.options.push({
7777
label: 'Default',
7878
value: '1'

0 commit comments

Comments
 (0)