mirror of
https://github.com/rivo/tview.git
synced 2026-04-26 13:25:51 +03:00
[GH-ISSUE #299] Add "autocomplete" functionality to the InputField #226
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#226
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 @mikeschinkel on GitHub (Jun 10, 2019).
Original GitHub issue: https://github.com/rivo/tview/issues/299
Hi @rivo:
See your comment on #77, which is closed, but you mentioned that you might possibly implement the autocomplete functionality you mentioned.
For my use-case I need to be able to present several items that users can choose from and either allow them to select one, or be able to enter a custom value. I have numerous fields that need this but one example is a software version number where I have a list of released version numbers but the user may actually be using a beta version where the version number is not released.
I am willing to (help) implement the autocomplete, as you have probably seen my recent flurry of PRs, but as that would be a bit more complex I would want input from you as to how you would prefer it to be implemented.
@diamondburned commented on GitHub (Jun 10, 2019):
Can be done by hacking in a List on top. I've done it.
@mikeschinkel commented on GitHub (Jun 10, 2019):
@diamondburned Care to share (code?) :-)
@diamondburned commented on GitHub (Jun 11, 2019):
https://gitlab.com/diamondburned/6cord/blob/master/main.go#L266 is where I add things.
The rest of the logic is in
fuzzy*.go@rivo commented on GitHub (Jul 8, 2019):
Autocomplete functionality was requested earlier (#77) and I agree it's a useful addition to
InputField. So I went ahead and addedSetAutocompleteFunc()(along withAutocomplete()) to theInputFieldclass.There are two additional examples in the
demos/inputfielddirectory which illustrates their usage. See theWikifor an explanation.