I have a react component that is generating a list. For examples sake lets say that it looks like this:
<table>
<tbody>
<tr>
<td>
{...}
</td>
</tr>
{/* These are being generated so there are a bunch*/}
</tbody>
</table>
However I want the list to function in a way that the active list item always falls in the center of the screen. This is not too much of a problem except for when I get to the top or the bottom of the list. I need a way to scroll past the top or the bottom of the list and I am not quite too sure how to do this.
The first idea I had was to create some empty table rows to fill the space needed to scroll up past the top or down past the bottom, but this felt like a "hacky" solution. Any help would be appreciated. Thanks.