This commit is contained in:
Ivan Danyliuk 2018-10-23 17:21:51 +02:00
parent a99d940fab
commit 4c8e2b71f4
No known key found for this signature in database
GPG Key ID: 97ED33CE024E1DBF

View File

@ -271,12 +271,12 @@ func (p *Page) renderTabs() *vecty.HTML {
)
}
// onTabSwitch returns a proper tab switching function depending on the tab clicked.
func (p *Page) onTabSwitch(view string) func(e *vecty.Event) {
if p.activeView == view {
return nil
}
return func(e *vecty.Event) {
fmt.Println("Set view", view)
p.activeView = view
vecty.Rerender(p)
}