Skip to content

Infinite loop after pressing down key for table #1146

@xixiliguo

Description

@xixiliguo

Create table with one row which was non-selectable.
After press down, cpu of process is 100%

code

package main

import (
	"github.com/rivo/tview"
)

func main() {
	t := tview.NewTable()
	t.SetFixed(1, 2).SetSelectable(true, false)

	cols := []string{"cpu", "memory", "disk"}
	for i, col := range cols {
		t.SetCell(0, i, tview.NewTableCell(col).SetSelectable(false))
	}
	app := tview.NewApplication()
	if err := app.SetRoot(t, true).SetFocus(t).Run(); err != nil {
		return
	}
}

The actual scenario is that my app have table which contains a lot of data. But after filtering, data set is empty. header remains. pressing down key causes an issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions