Skip to content

Commit

Permalink
fix(igx-grid): Scroll filtered column in view, #3451
Browse files Browse the repository at this point in the history
  • Loading branch information
sstoyanovIG committed Dec 18, 2018
1 parent 1ba2d4e commit 0784860
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,13 @@ export class IgxGridFilteringCellComponent implements AfterViewInit, OnInit, DoC
this.expressionsList[0].isSelected = true;
}

const index = this.filteringService.unpinnedFilterableColumns.indexOf(this.column);
if (index >= 0 && !this.isColumnRightVisible(index)) {
this.filteringService.scrollToFilterCell(this.filteringService.unpinnedFilterableColumns[index], true);
} else if (index >= 0 && !this.isColumnLeftVisible(index)) {
this.filteringService.scrollToFilterCell(this.filteringService.unpinnedFilterableColumns[index], false);
}

this.filteringService.filteredColumn = this.column;
this.filteringService.isFilterRowVisible = true;
this.filteringService.selectedExpression = expression;
Expand Down Expand Up @@ -357,7 +364,7 @@ export class IgxGridFilteringCellComponent implements AfterViewInit, OnInit, DoC
}
}
const width = this.filteringService.displayContainerWidth + this.filteringService.displayContainerScrollLeft;
return currentColumnRight <= width && this.isColumnLeftVisible(columnIndex);
return currentColumnRight <= width;
}

private isColumnLeftVisible(columnIndex: number): boolean {
Expand Down

0 comments on commit 0784860

Please sign in to comment.