(col int, order SortOrder)
| 278 | } |
| 279 | |
| 280 | func (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 | |
| 298 | func (m *reflectTableModel) Len() int { |
| 299 | return m.RowCount() |