fix(table): use 0 as first row index (no off by one)

This commit is contained in:
bashbunni
2024-09-24 17:18:26 -07:00
parent 14927f0b94
commit a0b7e17ab1
-6
View File
@@ -11,11 +11,6 @@ import (
"github.com/charmbracelet/lipgloss/table"
)
const (
header int = 0
firstRow int = 1
)
// Model defines a state for the table widget.
type Model struct {
KeyMap KeyMap
@@ -153,7 +148,6 @@ type Option func(*Model)
// New creates a new model for the table widget.
func New(opts ...Option) Model {
m := Model{
cursor: firstRow,
table: table.New(),
KeyMap: DefaultKeyMap(),
Help: help.New(),