Skip to content

Commit

Permalink
[se] Fix bug 34976
Browse files Browse the repository at this point in the history
  • Loading branch information
GoshaZotov committed Feb 12, 2025
1 parent 88814cd commit 4232db4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion cell/model/autofilters.js
Original file line number Diff line number Diff line change
Expand Up @@ -4471,7 +4471,7 @@
return range;
},

expandRange: function (activeRange, ignoreFilter, doNotCheckEmpty) {
expandRange: function (activeRange, ignoreFilter, doNotCheckEmpty, checkLastEmpty) {
var ws = this.worksheet;

//если вдруг встретили мерженную ячейку в диапазоне, расширяем
Expand Down Expand Up @@ -4710,6 +4710,14 @@
doExpand();
}


if (checkLastEmpty) {
let _cropRange = this.checkEmptyAreas(range, rangeAfterTableCrop);
if (_cropRange.r2 !== range.r2 || _cropRange.c2 !== range.c2) {
return activeRange;
}
}

//проверяем на наличие пустых колонок/строк
return doNotCheckEmpty ? range : this.checkEmptyAreas(range, rangeAfterTableCrop);
},
Expand Down
2 changes: 1 addition & 1 deletion cell/view/WorksheetView.js
Original file line number Diff line number Diff line change
Expand Up @@ -9920,7 +9920,7 @@
}

if (!newRange) {
newRange = this.model.autoFilters.expandRange(ar, true);
newRange = this.model.autoFilters.expandRange(ar, true, true, true);
}

if (newRange) {
Expand Down

0 comments on commit 4232db4

Please sign in to comment.