mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #579] treeview changed callback behavior changed #425
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#425
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 @polothy on GitHub (Mar 14, 2021).
Original GitHub issue: https://github.com/rivo/tview/issues/579
If you scroll to the bottom of change set
github.com/rivo/tview@4624fa9b67, you will see the removal oft.process().This had (I think) an unintended side effect. I'm using the
SetChangedFuncfunction to register a callback that updates other views whenever the currently selected treeview item changes. The other views show extended details about the currently selected treeview item.With the removal of
t.process()in the input event loop, the updates to other views does not get drawn. Instead, the other views show the last selected treeview item instead of the currently selected.Maybe there is a better way to accomplish what I'm doing? I tried calling various draw and update functions in my callback, but those ended in deadlocks.
Thanks for any help in advance! Cheers 🍻
@polothy commented on GitHub (Mar 14, 2021):
Just wanted to add: I did try adding this line back and prior behavior was restored. I'm not sure if that's the actual fix though.
@rivo commented on GitHub (Apr 26, 2021):
It was. I guess I did not remember that
process()also fired thechangedcallback.Thanks.
@polothy commented on GitHub (Apr 26, 2021):
Awesome, TYVM!