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

Method Clear

gui/table.go:534–547  ·  view source on GitHub ↗

Clear removes all rows from the table

()

Source from the content-addressed store, hash-verified

532
533// Clear removes all rows from the table
534func (t *Table) Clear() {
535
536 for ri := 0; ri < len(t.rows); ri++ {
537 trow := t.rows[ri]
538 t.Panel.Remove(trow)
539 trow.DisposeChildren(true)
540 trow.Dispose()
541 }
542 t.rows = nil
543 t.firstRow = 0
544 t.rowCursor = -1
545 t.recalc()
546 t.Dispatch(OnTableRowCount, nil)
547}
548
549// SelectedRows returns a slice with the indexes of the currently selected rows
550// If no row are selected returns an empty slice

Callers 1

recalcMethod · 0.45

Calls 5

recalcMethod · 0.95
DisposeChildrenMethod · 0.80
DisposeMethod · 0.65
DispatchMethod · 0.65
RemoveMethod · 0.45

Tested by

no test coverage detected