mirror of
https://github.com/zoriya/bubbles.git
synced 2026-08-16 01:43:21 +00:00
Merge branch 'master' into v2-exp-table-tests
This commit is contained in:
@@ -305,6 +305,11 @@ func (m Model) Columns() []Column {
|
||||
// SetRows sets a new rows state.
|
||||
func (m *Model) SetRows(r []Row) {
|
||||
m.rows = r
|
||||
|
||||
if m.cursor > len(m.rows)-1 {
|
||||
m.cursor = len(m.rows) - 1
|
||||
}
|
||||
|
||||
m.UpdateViewport()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user