[SSE] Fix Bug 56225

This commit is contained in:
Julia Radzhabova 2022-03-23 18:53:40 +03:00
parent 2799aea94f
commit d452e6b67b
2 changed files with 10 additions and 7 deletions

View file

@ -2451,13 +2451,15 @@ define([
} }
funcarr.sort(function (a,b) { funcarr.sort(function (a,b) {
var atype = a.asc_getType(), var atype = a.asc_getType(),
btype = b.asc_getType(), btype = b.asc_getType();
aname = a.asc_getName(true).toLocaleUpperCase(), if (atype===btype && (atype === Asc.c_oAscPopUpSelectorType.TableColumnName))
bname = b.asc_getName(true).toLocaleUpperCase(); return 0;
if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1; if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1;
if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1; if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1;
if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype) if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype)
return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1; return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1;
var aname = a.asc_getName(true).toLocaleUpperCase(),
bname = b.asc_getName(true).toLocaleUpperCase();
if (aname < bname) return -1; if (aname < bname) return -1;
if (aname > bname) return 1; if (aname > bname) return 1;
return 0; return 0;

View file

@ -47,14 +47,15 @@ const CellEditor = inject("storeFunctions")(observer(props => {
if(funcArr) { if(funcArr) {
funcArr.sort(function (a, b) { funcArr.sort(function (a, b) {
let atype = a.asc_getType(), let atype = a.asc_getType(),
btype = b.asc_getType(), btype = b.asc_getType();
aname = a.asc_getName(true).toLocaleUpperCase(), if (atype===btype && (atype === Asc.c_oAscPopUpSelectorType.TableColumnName))
bname = b.asc_getName(true).toLocaleUpperCase(); return 0;
if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1; if (atype === Asc.c_oAscPopUpSelectorType.TableThisRow) return -1;
if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1; if (btype === Asc.c_oAscPopUpSelectorType.TableThisRow) return 1;
if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype) if ((atype === Asc.c_oAscPopUpSelectorType.TableColumnName || btype === Asc.c_oAscPopUpSelectorType.TableColumnName) && atype !== btype)
return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1; return atype === Asc.c_oAscPopUpSelectorType.TableColumnName ? -1 : 1;
let aname = a.asc_getName(true).toLocaleUpperCase(),
bname = b.asc_getName(true).toLocaleUpperCase();
if (aname < bname) return -1; if (aname < bname) return -1;
if (aname > bname) return 1; if (aname > bname) return 1;