jupyter-widgets / ipydatagrid

Fast Datagrid widget for the Jupyter Notebook and JupyterLab
BSD 3-Clause "New" or "Revised" License
580 stars 51 forks source link

Auto-scroll to the last row or to a selected row #408

Open j-baum opened 1 year ago

j-baum commented 1 year ago

Is your feature request related to a problem? Please describe. Most of the data I work with is time-based, where the newest data entries are in the last row. If I use ipydatagrid to display this data, I have to scroll a long way to get all the way to the bottom, where the newest data is. Even if I select the bottom row before I show the grid, datagrid still renders with the very top row in view.

Describe the solution you'd like I would like something like grid.scroll_to(row = 100) to make row #100 visible in the grid rendering. Or grid.autoscroll = True to always startup at the last data row.

I would be happy to help with the implementation, but I assume some js/css expertise is required, which I don't have. If it can be done from the python side, a pointer in where to start looking at the code would be appreciated.

ankostis commented 1 year ago

Really interested as well, and for any workarounds to emulate a potential set_visible_range() method.

Relates to #305.