From 48e3f85baff5cd56573ec2aa11fa79fcaf1b48a3 Mon Sep 17 00:00:00 2001 From: Christian Rocha Date: Tue, 11 Jan 2022 11:59:54 -0500 Subject: [PATCH] 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. --- list/list.go | 1 + 1 file changed, 1 insertion(+) diff --git a/list/list.go b/list/list.go index 19e61d7..266e7f3 100644 --- a/list/list.go +++ b/list/list.go @@ -340,6 +340,7 @@ func (m *Model) InsertItem(index int, item Item) tea.Cmd { } m.updatePagination() + m.updateKeybindings() return cmd }