Open puehringer opened 4 years ago
For now, I fixed it in my app by applying this style:
.lineup-engine:not(.le-shifted) .lu-header.frozen {
left: 0px !important;
}
For lineup#v4, the CSS class was renamed:
.lineup-engine:not(.le-shifted) .lu-header.le-frozen {
left: 0px !important;
}
Steps to reproduce
disableFrozenColumns: false
in yourLineUpFlags
configurationObserved behavior
Even if the ranking is not shifted (no![Peek 2019-10-17 12-59](https://user-images.githubusercontent.com/51900829/67003331-f75cbf00-f0dd-11e9-9d90-e920873ad838.gif)
le-shifted
class), the shift per column style is applied if they are frozen. The frozen columns are implemented by settingleft: ...px
, which only works becausele-shifted
is active on the main lineup engine, as the styleposition: sticky;
is applied to the column. Ifle-shifted
is not present, theleft: ...px
is still applied, offsetting the column even if no shift is required. This causes a hiding of the column behind the others if no scroll is possible/the scrollbar is on the very left.Additionally, it seems that the margin of
5px
which is usually applied to separate each column is not included in the calculation.Expected behavior
left: ...px
only ifle-shifted
is present.Possible Solution
The following lines cause the issue (I think): https://github.com/lineupjs/lineupengine/blob/v2.1.0/src/style/GridStyleManager.ts#L165-L173
When calling
this.updateRule
, one could prepend the CSS selector forle-shifted
, such that this rule only applies if it is present. This would cause theleft: ...px
to not apply on non-shifted rankings.