diff options
| author | Jeff Carr <[email protected]> | 2025-09-16 10:55:40 -0500 | 
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-09-16 10:55:40 -0500 | 
| commit | 61ccdc69bb1caa2ea869647d72ad576e951d2c70 (patch) | |
| tree | bbe3d3d4cec3219dedaebb5a0e04ae744390dafe | |
| parent | 20021d7d6b034c1f0e589748c55437f06482bd83 (diff) | |
found anypb.Any type
| -rw-r--r-- | table.go | 24 | 
1 files changed, 24 insertions, 0 deletions
@@ -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  }  | 
