File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed
Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 11module github.com/lundjrl/chef
22
3- go 1.23.0
4-
5- toolchain go1.24.4
3+ go 1.25.4
64
75require (
86 github.com/charmbracelet/bubbles v0.21.0
Original file line number Diff line number Diff line change @@ -111,11 +111,17 @@ func (m mainModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
111111 m .TextInput .Cursor .SetMode (cursor .New ().Mode ())
112112 }
113113 case "2" :
114- selected := m .Table .SelectedRow ()
115- id := selected [0 ]
114+ id := string (rune (m .Table .Cursor ()))
116115 count := 2 // count should be a dynamic string
117116
118117 db .UpdateInventoryItem (id , count )
118+ rows := m .Table .Rows ()
119+
120+ row := m .Table .SelectedRow ()
121+ row [2 ] = "2"
122+ rows [0 ] = row
123+
124+ m .Table .SetRows (rows )
119125 case "tab" :
120126 switch m .State {
121127 case shared .TableView :
You can’t perform that action at this time.
0 commit comments