Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scroll filtered column in view #3468

Merged
merged 3 commits into from
Jan 3, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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