MCPcopy
hub / github.com/g3n/engine / InsertRow

Method InsertRow

gui/table.go:506–515  ·  view source on GitHub ↗

InsertRow inserts the specified values in a new row at the specified index

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

Source from the content-addressed store, hash-verified

504
505// InsertRow inserts the specified values in a new row at the specified index
506func (t *Table) InsertRow(row int, values map[string]interface{}) {
507
508 // Checks row index
509 if row < 0 || row > len(t.rows) {
510 panic(tableErrInvRow)
511 }
512 t.insertRow(row, values)
513 t.recalc()
514 t.Dispatch(OnTableRowCount, nil)
515}
516
517// RemoveRow removes from the specified row from the table
518func (t *Table) RemoveRow(row int) {

Callers 1

AddRowMethod · 0.95

Calls 3

insertRowMethod · 0.95
recalcMethod · 0.95
DispatchMethod · 0.65

Tested by

no test coverage detected