summaryrefslogtreecommitdiff
path: root/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'table.go')
-rw-r--r--table.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/table.go b/table.go
index 625b6a1..eac6fd9 100644
--- a/table.go
+++ b/table.go
@@ -339,5 +339,29 @@ func (parent *Node) makeTableGrid(pb *guipb.Table) *Node {
}
}
+ for _, r := range pb.AnyCols {
+ // log.Info("gui: got time row:", i, r.Header, r.Vals)
+ header := addNode()
+ r.Header.Id = int64(header.id)
+ for _, v := range r.Vals {
+ label := addNode()
+ label.WidgetType = widget.Label
+ label.parent = grid
+ label.enabled = true
+ grid.children = append(grid.children, label)
+
+ pbwidget := new(guipb.Widget)
+ pbwidget.Id = int64(label.id)
+ anyValue, err := anypb.New(v)
+ if err != nil {
+ log.Info("gui: failed to add time", err)
+ continue
+ }
+ pbwidget.Val = anyValue
+ r.Widgets = append(r.Widgets, pbwidget)
+ // log.Info("gui: added new val", pbwidget)
+ }
+ }
+
return grid
}