MCPcopy
hub / github.com/wavetermdev/waveterm / defaultCellRenderer

Function defaultCellRenderer

tsunami/ui/table.go:172–180  ·  view source on GitHub ↗

Default cell renderer

(ctx CellContext[T])

Source from the content-addressed store, hash-verified

170
171// Default cell renderer
172func defaultCellRenderer[T any](ctx CellContext[T]) any {
173 if ctx.Value == nil {
174 return vdom.H("span", map[string]any{
175 "className": "text-gray-500",
176 }, "-")
177 }
178
179 return vdom.H("span", nil, fmt.Sprintf("%v", ctx.Value))
180}
181
182// Default header renderer
183func defaultHeaderRenderer(ctx HeaderContext) any {

Callers 1

genTableRenderFuncFunction · 0.85

Calls 1

HFunction · 0.92

Tested by

no test coverage detected