mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #1041] Event for table navigation before/after first/last row? #751
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#751
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @jsumners-nr on GitHub (Oct 17, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1041
If we have a table backed by a
TableContentthat 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 theSetSelectionChangedFuncreceives any events in such a case.@jsumners-nr commented on GitHub (Oct 17, 2024):
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
TableContentto facilitate presenting the data.@jsumners-nr commented on GitHub (Feb 2, 2026):
A bit of an update on this: I didn't see https://github.com/rivo/tview/wiki/VirtualTable originally. I came back to my project recently, found that document, and refactored my application to apply it (I was already using
TableContent, but in a less optimal way). I have seen a significant performance improvement, but my app still chokes when the data set is too large. My situation:TableContent's design, I issue queries like:This, I believe, is where the issue lies. In order to support
TableContent's(row, col)access, I need therow_numberwindow function. That results in a full table scan for each update ofTableContent.Basically, I'm struggling to understand how to utilize
TableContentin an efficient manner.