Closed Kugelschieber closed 8 years ago
You could reinitialize the slice termui.Body.Rows
by using:
termui.Body.Rows = []*termui.Body.Rows{}
I am new to Go, so not sure if this is the best way to do this.
To reset, before AddRows
I did:
ui.Body.Rows = ui.Body.Rows[:0]
How can I clear the terminal and render a new grid? I'm trying to implement multiple views the user can switch between. The first one uses termui.Body. But when I add new rows and call render, they are appended (of course). I tried reinitializing the Body
and creating a separate grid:
But both result in an empty terminal.