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. // View renders the pagination to a string.
func View(model tea.Model) string { func View(m Model) string {
m, ok := model.(Model)
if !ok {
return "could not perform assertion on model"
}
switch m.Type { switch m.Type {
case Dots: case Dots:
return dotsView(m) return dotsView(m)