Skip to content

Commit

Permalink
fix: table height
Browse files Browse the repository at this point in the history
  • Loading branch information
acifani committed Sep 3, 2024
1 parent 0bd532c commit 50932a7
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/ui/driver/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
} else {
m.data = msg.data
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/quali/quali.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
} else {
m.raceName = msg.data.Races[0].RaceName
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/results/results.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
} else {
m.data = msg.data
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/season/season.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
} else {
m.year = msg.data.Season
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/wcc/wcc.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
m.err = msg.err
} else {
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down
2 changes: 1 addition & 1 deletion internal/ui/wdc/wdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ func (m model) Update(msg tea.Msg) (page.Model, tea.Cmd) {
} else {
m.data = msg.data
rows := generateRows(msg.data)
m.table.SetHeight(len(rows))
m.table.SetHeight(len(rows) + 2)
m.table.SetRows(rows)
}
}
Expand Down

0 comments on commit 50932a7

Please sign in to comment.