Merge pull request #1647 from ONLYOFFICE/fix/bugfix

[SSE] Fix Bug 56225
This commit is contained in:
Julia Radzhabova 2022-03-23 19:08:06 +03:00 committed by GitHub
commit 09fa6f64b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 7 deletions

View file

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

View file

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