mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-10-10 14:16:41 +03:00
Remove blink state when changing focus
This commit is contained in:
@@ -29,7 +29,7 @@ type Model struct {
|
||||
func initialize() (tea.Model, tea.Cmd) {
|
||||
n := input.DefaultModel()
|
||||
n.Placeholder = "Name"
|
||||
n.Focus = true
|
||||
n.Focus()
|
||||
|
||||
e := input.DefaultModel()
|
||||
e.Placeholder = "Email"
|
||||
@@ -75,10 +75,10 @@ func update(msg tea.Msg, model tea.Model) (tea.Model, tea.Cmd) {
|
||||
|
||||
for i := 0; i < len(inputs); i++ {
|
||||
if i == m.index {
|
||||
inputs[i].Focus = true
|
||||
inputs[i].Focus()
|
||||
continue
|
||||
}
|
||||
inputs[i].Focus = false
|
||||
inputs[i].Blur()
|
||||
}
|
||||
|
||||
m.nameInput = inputs[0]
|
||||
|
Reference in New Issue
Block a user