rivo / tview

Terminal UI library with rich, interactive widgets — written in Golang
MIT License
11.17k stars 574 forks source link

table scroll past selected area #814

Closed 0xRoM closed 1 year ago

0xRoM commented 1 year ago

Hi, I've setup the demo lorum ipsum table inside a flex and get a scroll bar. if I click the first row I cant scroll down, if I click the 3rd row I can scroll down until the selected one is at the top, I cant scroll the selected out of view. the same goes at the bottom, if I select the bottom row I cant scroll up.

is this intended? how can I make it so I can scroll the entire table?

when the app is first launched and the 1st row is selected (a static row) then the whole table is scrollable, however that row cant be selected again as it just reorders by the column.

rivo commented 1 year ago

Can you post the source code to reproduce this?

RossMarks-IRM commented 1 year ago

I fixed it by not having a selected row and instead changing the color of the current row clicked on with SetSelectionChangedFunc