mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 21:35:54 +03:00
[GH-ISSUE #1004] Feature request: add GetSelectedFunc method for TreeView component #726
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#726
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 @alekseysavchuk on GitHub (Jul 11, 2024).
Original GitHub issue: https://github.com/rivo/tview/issues/1004
I've created wrappers for some library components those change wrapped component's default behavior on input. This follows a decorator pattern. My logic handles some inputs while relying on the component's default behavior for others. I understand I could create my own components to achieve this but I'd like to keep doing it that way.
Most library components have a comprehensive interface. All setters have corresponding getters, for example,
SetDrawFunc-GetDrawFunc,SetInputCapture-GetInputCapture, etc. However, some components do not follow this pattern. For instance,TreeViewhasSetSelectedFuncbut lacksGetSelectedFunc.Here's a minimal example of the wrapper I've created
and I use it that way
@rivo commented on GitHub (Aug 4, 2024):
This is fine. I left a minor request for your PR.