This commit is contained in:
Jesse Duffield
2020-08-20 08:24:35 +10:00
parent 9ee7793782
commit 99707a527d
6 changed files with 98 additions and 47 deletions

View File

@@ -23,6 +23,7 @@ type Context interface {
GetKind() int
GetViewName() string
GetKey() string
GetSelectedItemId() string
}
type BasicContext struct {
@@ -34,6 +35,11 @@ type BasicContext struct {
ViewName string
}
// TODO: think about whether we need this on the Context interface or if it should just be on the ListContext struct
func (c BasicContext) GetSelectedItemId() string {
return ""
}
func (c BasicContext) HandleRender() error {
if c.OnRender != nil {
return c.OnRender()