mirror of
https://github.com/Maks1mS/bubbles.git
synced 2025-03-20 15:43:43 +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()
|
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.
|
// SetWidth sets the width of the viewport of the table.
|
||||||
func (m *Model) SetWidth(w int) {
|
func (m *Model) SetWidth(w int) {
|
||||||
m.viewport.Width = w
|
m.viewport.Width = w
|
||||||
|
Loading…
Reference in New Issue
Block a user