MCPcopy Create free account
hub / github.com/cogentcore/core / sortFieldName

Method sortFieldName

core/table.go:430–441  ·  view source on GitHub ↗

sortFieldName returns the name of the field being sorted, along with :up or :down depending on ascending or descending sorting.

()

Source from the content-addressed store, hash-verified

428// sortFieldName returns the name of the field being sorted, along with :up or
429// :down depending on ascending or descending sorting.
430func (tb *Table) sortFieldName() string {
431 if tb.sortIndex >= 0 && tb.sortIndex < tb.numVisibleFields {
432 nm := tb.visibleFields[tb.sortIndex].Name
433 if tb.sortDescending {
434 nm += ":down"
435 } else {
436 nm += ":up"
437 }
438 return nm
439 }
440 return ""
441}
442
443// setSortFieldName sets sorting to happen on given field and direction
444// see [Table.sortFieldName] for details.

Callers 1

saveSortSettingsMethod · 0.80

Implementers 1

_cogentcore_org_core_plot_plots_Tableyaegicore/symbols/cogentcore_org-core-

Calls

no outgoing calls

Tested by

no test coverage detected