anchor.diff:      LFilterFound: boolean;
       LFilter: TColumnFilter;
       LData: PDataTable;
  +
  +    function UpdateFilterSortDirection(const AColumnName: utf8string; ASortDirection: TSortDirection): boolean;
  +    var
  +      i: Integer;
  +    begin
  +      for i := 0 to FFilters.Count-1 do
  +        if FFilters[i].ColumnName = AColumnName then
  +        begin
  +          LFilter := FFilters[i];
  +          LFilter.Sort := ASortDirection;
  +          FFilters[i] := LFilter;
  +          Exit(True);
  +        end;
  +      Result := False;
  +    end;
  +
     begin
       LColumnsToAdd := TList<Integer>.Create;
   
  
positive.code:         if FColumns[i].SortDirection <> sdNone then
          begin
            // try to find column in existing filters
            LFilterFound := False;
            for j := 0 to FFilters.Count-1 do
              if FFilters[j].ColumnName = LData.Columns[i] then
              begin
                LFilter := FFilters[j];
                LFilter.Sort := FColumns[i].SortDirection;
                FFilters[j] := LFilter;
                LFilterFound:=true;
              end;
            // if filter not found we need to create it later
            if not LFilterFound then
              LColumnsToAdd.Add(i);
          end;
  
        // add missing filters
        FFilters.Count:=FFilters.Count + LColumnsToAdd.Count;
  
negative.code:           end;
          end;
  
          FFilters.Add(LColumnFilter);
        end;
      end;
  
  