feat(table): add SetColumns method to set columns

This commit is contained in:
Maas Lalani 2022-09-27 13:11:34 -04:00
parent a4ed54327f
commit 1e920595f2
No known key found for this signature in database
GPG Key ID: 5A6ED5CBF1A0A000

View File

@ -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