Skip to content

Commit

Permalink
feat(table): add SetColumns method to set columns
Browse files Browse the repository at this point in the history
  • Loading branch information
maaslalani committed Sep 27, 2022
1 parent a4ed543 commit 1e92059
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ func (m *Model) SetRows(r []Row) {
m.UpdateViewport()
}

// SetColumns set a new columns state.
func (m *Model) SetColumns(c []Column) {
m.cols = c
m.UpdateViewport()
}

// SetWidth sets the width of the viewport of the table.
func (m *Model) SetWidth(w int) {
m.viewport.Width = w
Expand Down

0 comments on commit 1e92059

Please sign in to comment.