update size based on screen

This commit is contained in:
2025-07-13 21:12:21 -07:00
parent 491416a575
commit 7032659d07
2 changed files with 25 additions and 6 deletions

View File

@@ -588,11 +588,23 @@ func (m *Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.width = msg.Width
m.height = msg.Height
// Update current view with new dimensions
if tableList, ok := m.currentView.(*TableListModel); ok {
tableList.Shared.Width = m.width
tableList.Shared.Height = m.height
switch v := m.currentView.(type) {
case *TableListModel:
v.Shared.Width = m.width
v.Shared.Height = m.height
case *TableDataModel:
v.Shared.Width = m.width
v.Shared.Height = m.height
case *RowDetailModel:
v.Shared.Width = m.width
v.Shared.Height = m.height
case *EditCellModel:
v.Shared.Width = m.width
v.Shared.Height = m.height
case *QueryModel:
v.Shared.Width = m.width
v.Shared.Height = m.height
}
// Add similar updates for other model types as needed
case tea.KeyMsg:
switch {