arunghosh / react-heatmap-grid

A react component for heatmap visualisation in grid layout
https://codesandbox.io/s/r4rvwkl3yn
MIT License
77 stars 41 forks source link

ylabels follow scroll because it is absolute #199

Open seho0808 opened 3 years ago

seho0808 commented 3 years ago

If you include react-heatmap-grid inside a div with long height that is overflow-y-scroll, the ylabels follow scroll. I tried changing the css inside chrome developer mode from

style="position: absolute; text-align: right; padding-right: 5px; padding-top: 13.5135px; width: 200px;"

to

style="position: static; text-align: right; padding-right: 5px; padding-top: 13.5135px; width: 200px;"

and it seemed to work. Is there any reason you guys set it to position: absolute for the ylabels' div?

freewill777 commented 2 years ago

If you include react-heatmap-grid inside a div with long height that is overflow-y-scroll, the ylabels follow scroll. I tried changing the css inside chrome developer mode from

style="position: absolute; text-align: right; padding-right: 5px; padding-top: 13.5135px; width: 200px;"

to

style="position: static; text-align: right; padding-right: 5px; padding-top: 13.5135px; width: 200px;"

and it seemed to work. Is there any reason you guys set it to position: absolute for the ylabels' div?

Where did you added the position:static ?