MCPcopy Index your code
hub / github.com/g3n/engine / setRow

Method setRow

gui/table.go:665–675  ·  view source on GitHub ↗

setRow sets the value of all the cells of the specified row from the specified map indexed by column id.

(row int, values map[string]interface{})

Source from the content-addressed store, hash-verified

663// setRow sets the value of all the cells of the specified row from
664// the specified map indexed by column id.
665func (t *Table) setRow(row int, values map[string]interface{}) {
666
667 for ci := 0; ci < len(t.header.cols); ci++ {
668 c := t.header.cols[ci]
669 cv, ok := values[c.id]
670 if !ok {
671 continue
672 }
673 t.setCell(row, c.id, cv)
674 }
675}
676
677// setCell sets the value of the cell specified by its row and column id
678func (t *Table) setCell(row int, colid string, value interface{}) {

Callers 2

SetRowsMethod · 0.95
SetRowMethod · 0.95

Calls 1

setCellMethod · 0.95

Tested by

no test coverage detected