Open IlCallo opened 5 years ago
I am trying to use the material table with 4 sticky columns, 2 of them to left and 2 of them to right. The problem is that the offset is calculated wrong by sticky and stickyEnd attributes from angular material. Does anyone have the same issue?
Yes, I have the exact same issue. How does ng calculate the offsets?
I believe this is because of the fact that "By default, tab contents are eagerly loaded. Eagerly loaded tabs will initialize the child components but not inject them into the DOM until the tab is activated" (https://material.angular.io/components/tabs/overview#lazy-loading). This must mess up the left
property calculation in some way.
Using lazy loading on the tab with the table (matTabContent
) solved this issue for me.
What is the expected behavior?
Sticky position of sticky columns should be calculated rightfully always
What is the current behavior?
left
property of sticky columns inside a native-basedmat-table
, when placed inside amat-tab
, is always 0pxWhat are the steps to reproduce?
https://angular-material2-issue-pahywc.stackblitz.io
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 7.2.15 Material: 7.3.7 OS: W10 TypeScript: 3.2.4 Browser: all