Update paginator for bubbletea 0.12.0

This commit is contained in:
Christian Rocha
2020-10-16 14:36:08 -04:00
parent 82097a1c79
commit a498b857d6

View File

@@ -164,11 +164,7 @@ func Update(msg tea.Msg, m Model) (Model, tea.Cmd) {
}
// View renders the pagination to a string.
func View(model tea.Model) string {
m, ok := model.(Model)
if !ok {
return "could not perform assertion on model"
}
func View(m Model) string {
switch m.Type {
case Dots:
return dotsView(m)