Fixed textinput bug
This commit is contained in:
parent
891ea79d53
commit
ae05b237b4
@ -13,6 +13,10 @@ func (m model) Init() tea.Cmd {
|
||||
|
||||
func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
var cmd tea.Cmd
|
||||
|
||||
if m.addTask {
|
||||
m.textinput, cmd = m.textinput.Update(msg)
|
||||
}
|
||||
|
||||
switch msg := msg.(type) {
|
||||
|
||||
@ -73,9 +77,8 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if m.addTask {
|
||||
m.textinput, cmd = m.textinput.Update(msg)
|
||||
}
|
||||
|
||||
|
||||
// Return the updated model to the Bubble Tea runtime for processing.
|
||||
// Note that we're not returning a command.
|
||||
return m, cmd
|
||||
|
Loading…
x
Reference in New Issue
Block a user