mirror of
https://github.com/rivo/tview.git
synced 2026-04-29 14:55:54 +03:00
[GH-ISSUE #510] Creating input field dynamically on a form #370
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/tview#370
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 @JCzz on GitHub (Oct 7, 2020).
Original GitHub issue: https://github.com/rivo/tview/issues/510
Hi and thank you very much for this well structured package!
I am sure I am doing something wrong, I have the following "working" code - but it is not optimal. Can you see if there is a better way?
I am adding InputFields dynamically to a Form, but it is like the enclosed keys is always the last key. Therefore this do not work:
inputFormItems.InputFields[sortKey]in the accept or changed function in AddInputField
In Pseudo code:
This code works:
Thanks again and I hope I was able to describe the issue
@tslocum commented on GitHub (Oct 14, 2020):
Form.AddInputField adds a new
InputFieldto the form. Form.AddFormItem may be used to add an existingInputField.@JCzz commented on GitHub (Dec 27, 2020):
Thanks