Commit 8d20c9f8 authored by GoshaZotov's avatar GoshaZotov

fix bug 32533 - Сбрасывается значок фильтрации после применения Filter button в Table Settings

parent b1729282
...@@ -5132,9 +5132,18 @@ AutoFilter.prototype.showButton = function(val) { ...@@ -5132,9 +5132,18 @@ AutoFilter.prototype.showButton = function(val) {
var columnsLength = this.Ref.c2 - this.Ref.c1 + 1; var columnsLength = this.Ref.c2 - this.Ref.c1 + 1;
for(var i = 0; i < columnsLength; i++) for(var i = 0; i < columnsLength; i++)
{ {
this.FilterColumns[i] = new FilterColumn(); var filterColumn = this._getFilterColumnByColId(i);
this.FilterColumns[i].ColId = i; if(filterColumn)
this.FilterColumns[i].ShowButton = false; {
filterColumn.ShowButton = false;
}
else
{
filterColumn = new FilterColumn();
filterColumn.ColId = i;
filterColumn.ShowButton = false;
this.FilterColumns.push(filterColumn);
}
} }
} }
else else
...@@ -5173,6 +5182,24 @@ AutoFilter.prototype.getRangeWithoutHeaderFooter = function() ...@@ -5173,6 +5182,24 @@ AutoFilter.prototype.getRangeWithoutHeaderFooter = function()
return Asc.Range(this.Ref.c1, this.Ref.r1 + 1, this.Ref.c2, this.Ref.r2); return Asc.Range(this.Ref.c1, this.Ref.r1 + 1, this.Ref.c2, this.Ref.r2);
}; };
AutoFilter.prototype._getFilterColumnByColId = function(colId)
{
var res = false;
if(this.FilterColumns && this.FilterColumns.length)
{
for(var i = 0; i < this.FilterColumns.length; i++)
{
if(this.FilterColumns[i].ColId === colId)
{
res = this.FilterColumns[i];
break;
}
}
}
return res;
};
function FilterColumns() { function FilterColumns() {
this.ColId = null; this.ColId = null;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment