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

Method nextPage

gui/table.go:1041–1057  ·  view source on GitHub ↗

nextPage shows the next page of rows and selects its first row

()

Source from the content-addressed store, hash-verified

1039
1040// nextPage shows the next page of rows and selects its first row
1041func (t *Table) nextPage() {
1042
1043 if len(t.rows) == 0 {
1044 return
1045 }
1046 if t.lastRow == len(t.rows)-1 {
1047 t.rowCursor = t.lastRow
1048 t.recalc()
1049 t.Dispatch(OnChange, nil)
1050 return
1051 }
1052 plen := t.lastRow - t.firstRow
1053 if plen <= 0 {
1054 return
1055 }
1056 t.scrollDown(plen)
1057}
1058
1059// prevPage shows the previous page of rows and selects its last row
1060func (t *Table) prevPage() {

Callers 1

onKeyMethod · 0.95

Calls 3

recalcMethod · 0.95
scrollDownMethod · 0.95
DispatchMethod · 0.65

Tested by

no test coverage detected