1
0
mirror of https://github.com/Maks1mS/bubbles.git synced 2025-04-02 05:23:44 +03:00

Update keybindings after calling InsertItem on the list model

Specifically, if the list was emtpy prior to inserting an item the
up/down keybindings would be hidden and disabled.
This commit is contained in:
Christian Rocha 2022-01-11 11:59:54 -05:00
parent 5f256bf34f
commit 48e3f85baf

View File

@ -340,6 +340,7 @@ func (m *Model) InsertItem(index int, item Item) tea.Cmd {
}
m.updatePagination()
m.updateKeybindings()
return cmd
}