MCPcopy Index your code
hub / github.com/lxn/walk / sort

Method sort

reflectmodels.go:280–296  ·  view source on GitHub ↗
(col int, order SortOrder)

Source from the content-addressed store, hash-verified

278}
279
280func (m *reflectTableModel) sort(col int, order SortOrder) error {
281 if sb := m.sorterBase; sb != nil {
282 sb.col, sb.order = col, order
283
284 sort.Stable(m)
285
286 sb.changedPublisher.Publish()
287
288 return nil
289 }
290
291 if sorter, ok := m.dataSource.(Sorter); ok {
292 return sorter.Sort(col, order)
293 }
294
295 return nil
296}
297
298func (m *reflectTableModel) Len() int {
299 return m.RowCount()

Callers 4

newReflectTableModelFunction · 0.95
SortMethod · 0.80
SortMethod · 0.80
SortMethod · 0.80

Calls 2

SortMethod · 0.65
PublishMethod · 0.45

Tested by

no test coverage detected