mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #77] Editable DropDowns #57
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#57
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 @muesli on GitHub (Mar 13, 2018).
Original GitHub issue: https://github.com/rivo/tview/issues/77
Essentially a combination of an InputField and a DropDown: let the user enter a custom text or pick an item from the DropDown list (the address bar in your browser would be an example of such a UI widget).
@rivo commented on GitHub (Mar 13, 2018):
I understand what you describe here. (And I would probably describe this as some kind of "autocomplete" functionality for
InputFieldprimitives.) Is this something that you currently require in an application you're developing? Or is it just a general idea that you had?@muesli commented on GitHub (Mar 13, 2018):
Besides being a fairly common and convenient UI component, I'm actually writing a little systemd service manager (https://github.com/muesli/service-tools) which would directly benefit from such a feature.
@rivo commented on GitHub (Mar 15, 2018):
So there are two solutions I can think about:
DropDowncomponent so that you can enter text. This text will only be used to find a matching option in the drop-down list (the ones which have your entered text as a prefix). This basically helps the user jump to the desired option quickly.InputField. When the user enters text, a callback function is invoked which returns a list of matches. Those matches are then shown in a drop-down list and the user can choose from that list (using the up and down arrow keys).In the first solution, you can still only select from the options defined from the start. In the second solution, the user may choose to ignore the options presented to them and instead type whatever they want.
So these are different ideas. Let me know which one you are looking for in your application.
@muesli commented on GitHub (Mar 18, 2018):
I think both solutions would be nice additions to tview's behavior.
Regarding
@rivo commented on GitHub (Mar 18, 2018):
Ok. So the
DropDownprimitive now allows you to type to directly jump to matching options.Autocomplete in
InputFieldwill take a bit more effort. Not sure if I will have this very soon.