Skip to content

Commit

Permalink
Fix bug where updates reset viewport xoffset
Browse files Browse the repository at this point in the history
  • Loading branch information
robinovitch61 committed Jul 4, 2022
1 parent 6a31b8d commit 054be73
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/tui/components/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,8 +234,10 @@ func (m Model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
if msg.Page == m.currentPage {
m.getCurrentPageModel().SetHeader(msg.TableHeader)
m.getCurrentPageModel().SetAllPageData(msg.AllPageData)
if m.currentPageLoading() {
m.getCurrentPageModel().SetViewportXOffset(0)
}
m.getCurrentPageModel().SetLoading(false)
m.getCurrentPageModel().SetViewportXOffset(0)

switch m.currentPage {
case nomad.LogsPage:
Expand Down

0 comments on commit 054be73

Please sign in to comment.