diff --git a/application.go b/application.go index debe11c..15911b1 100644 --- a/application.go +++ b/application.go @@ -270,9 +270,11 @@ func (a *Application) SetFocus(p Primitive) *Application { a.screen.HideCursor() } a.Unlock() - p.Focus(func(p Primitive) { - a.SetFocus(p) - }) + if p != nil { + p.Focus(func(p Primitive) { + a.SetFocus(p) + }) + } return a } diff --git a/table.go b/table.go index c23cd71..003bd43 100644 --- a/table.go +++ b/table.go @@ -582,6 +582,7 @@ ColumnLoop: tableWidth -= widths[t.fixedColumns] + 1 columns = append(columns[:t.fixedColumns], columns[t.fixedColumns+1:]...) widths = append(widths[:t.fixedColumns], widths[t.fixedColumns+1:]...) + expansions = append(expansions[:t.fixedColumns], expansions[t.fixedColumns+1:]...) } // What's this column's width (without expansion)?