rivo / tview

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

Event for table navigation before/after first/last row? #1041

Open jsumners-nr opened 3 days ago

jsumners-nr commented 3 days ago

If we have a table backed by a TableContent that provides just enough rows for the table's visible dimensions, is there a way to detect when an attempt is made to navigate to an off-screen row? It doesn't seem like the SetSelectionChangedFunc receives any events in such a case.

jsumners-nr commented 3 days ago

I just discovered https://github.com/rivo/tview/issues/248 and the opening post is describing my exact use case. I am working on a log file explorer that will "index" the logs into an sqlite database. Various features will require getting new rows to display in the view. Doing this in memory is fine for the basic use, but I have seen some very large log files that this tool will be intended to work with (as in 3+ GiB). So at some point I'm going to need to window the data.

For what it's worth, I'm already making use of TableContent to facilitate presenting the data.