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