mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 22:32:59 +03:00
feat(table): add SetColumns
method to set columns
This commit is contained in:
parent
a4ed54327f
commit
1e920595f2
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user