mirror of
https://github.com/rivo/tview.git
synced 2026-04-27 05:45:49 +03:00
[GH-ISSUE #810] Exposing open state for the DropDown widget #590
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#590
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 @konaraya on GitHub (Feb 10, 2023).
Original GitHub issue: https://github.com/rivo/tview/issues/810
This library has been very useful to quickly build a terminal UI. Many thanks for the great work.
I was trying to make form navigation slightly more easier to use, especially in places where BackTab doesn't work. I can use SetInputCapture, and push KeyTab events when Arrow events are received and it makes it better. Only minor hiccup is the DropDown where the arrow keys are used to select the items themselves. Currently the open flag is private to the DropDown struct, so I can't use it in the logic within SetInputCapture. Having a IsOpen() member function that returns this value would be useful in my opinion.
It would be a single line change, I can gladly open a PR if you agree.
@rivo commented on GitHub (Mar 25, 2023):
I added
IsOpen()with the latest commit.