mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #323] Getting a selectionChanged notify when application uses Table.Select() #244
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#244
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 @pktgen on GitHub (Jul 19, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/323
Using a Table if I move the selected row/col via keyboard and I have the SetSelectionChangedFunc() the callback works great.
In my case I need to remove or add items to the table. This may mean the I need to change the selected row/col in the application. It would be nice to get a notification or callback called when I call the Table.Select() function.
I could not find anything in the docs about getting some callback for this type of event. As a test I went into the Table.Select() function and modified it to do this:
Do you think this is a reasonable change to get a notify call when the application moves to a different cell?
BTW, excellent package :-)
@rivo commented on GitHub (Jul 21, 2019):
Thanks for catching this. It should have triggered this event all along. The latest commit fixes this.