1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

tui, fixed field update errror after generate

This commit is contained in:
postmannen 2022-01-17 22:24:37 +01:00
parent b5c0152b00
commit 65bb1fe475

4
tui.go
View file

@ -485,6 +485,8 @@ func (t *tui) messageSlide(app *tview.Application) tview.Primitive {
fmt.Fprintf(p.logForm, " * message read: %v\n", m) fmt.Fprintf(p.logForm, " * message read: %v\n", m)
drawMessageInputFields(p, m) drawMessageInputFields(p, m)
}) })
// Clear the form.
p.inputForm.Clear(false)
p.inputForm.AddFormItem(messageDropdown) p.inputForm.AddFormItem(messageDropdown)
p.inputForm.AddButton("update message dropdown menu", func() { p.inputForm.AddButton("update message dropdown menu", func() {
@ -618,7 +620,7 @@ func (t *tui) messageSlide(app *tview.Application) tview.Primitive {
app.Stop() app.Stop()
}) })
app.SetFocus(p.inputForm) // app.SetFocus(p.inputForm)
p.saveForm. p.saveForm.
AddInputField("FileName", "", 40, nil, func(text string) { AddInputField("FileName", "", 40, nil, func(text string) {