Sticky columns show scrolled data between them.
What is the expected behavior?
Sticky columns should not show scrolled data between them.
What is the current behavior?
When making multiple columns sticky and resize the screen, Scrolled data can display between the sticky columns.
What are the steps to reproduce?
Used the stackblitz sticky column example. https://stackblitz.com/edit/angular-ay2dr9?file=app%2Ftable-sticky-columns-example.html
Made the first 3 columns sticky and the fourth column started to display between column 2 and 3.

Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
Here is with the scroll and symbol displays part before column 2 and part after column 2

@andrewseguin is this maybe just missing a background color?
I've seen the same problem after resize in my application. Not at all times, but often. It's not a missing background color, the css left property for the sticky column is not always updated respectively to early with old values.
My workaround for now is calling in the resize event handler
this.ngZone.onMicrotaskEmpty.pipe(take(3)).subscribe(() => this.table.updateStickyColumnStyles());
but of course it would be nice to avoid this.
PS: take(3) is to make sure the actual styles will be applied. take(1) isn't sufficient.
Any word on this?
Same issue on Chrome 79. Apply a style on table element:
style="border-collapse: separate"
Ref: https://stackoverflow.com/a/53559396/3378679
Having the same issue... any update?
Same issue when I have a long text in a column, below the first column is sticky and have a long text in the first cell.

For now working with below work around.
@ViewChild('matTable', { static: false }) set table(matTable: MatTable<any>) {
if (matTable) {
this.ngZone.onMicrotaskEmpty
.pipe(take(3))
.subscribe(() => matTable.updateStickyColumnStyles())
}
}
I have the same issue, it only seems to happen if I have 3 or more sticky columns.

Had the same issue
None of the above proposed solutions worked for me However this worked :
@ViewChild(MatTable) table: MatTable<any>;
ngAfterViewChecked(): void {
if (this.table) {
this.table.updateStickyColumnStyles();
}
}
This works for me. It enables that only for the tables with the sticky columns:
@ContentChild(MatTable, { static: false }) set table(val: MatTable<any>) {
this.ngZone.onMicrotaskEmpty.pipe(take(1)).subscribe(() => {
if (val?._contentColumnDefs?.some((x) => x.sticky || x.stickyEnd)) {
val.updateStickyColumnStyles();
}
});
}
@lancelot-c 's solution worked for me :+1:
The provided solutions didn't work for me - especially for a dialog. I applied the following style from #23954
position: sticky;
z-index: 10;
I have as well problems with the overflow especially with two rows in the header but I think my problem is basically one the these two tickets.