Skip to content

Commit

Permalink
Update keybindings after calling InsertItem on the list model
Browse files Browse the repository at this point in the history
Specifically, if the list was emtpy prior to inserting an item the
up/down keybindings would be hidden and disabled.
  • Loading branch information
meowgorithm committed Jan 11, 2022
1 parent 5f256bf commit 48e3f85
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions list/list.go
Expand Up @@ -340,6 +340,7 @@ func (m *Model) InsertItem(index int, item Item) tea.Cmd {
}

m.updatePagination()
m.updateKeybindings()
return cmd
}

Expand Down

0 comments on commit 48e3f85

Please sign in to comment.