TableView sorts its rows by the sortColumn's Comparator. When this happens, the rows are then at different indices than what the TableViewDataSource provided them at. When row selection occurs after sorting, the indices the delegate receives are incorrect / useless.
What should happen instead, is what NSTableView does: that is, the delegate should be extended to include a didSetSortColumn callback, where the caller can sort the backing data set, and call $(tableView, reloadData) when done.
I'm working on this now; just wanted to capture it via issue.
CC @kaadmy
TableView
sorts itsrows
by thesortColumn
'sComparator
. When this happens, the rows are then at different indices than what theTableViewDataSource
provided them at. When row selection occurs after sorting, the indices thedelegate
receives are incorrect / useless.What should happen instead, is what
NSTableView
does: that is, thedelegate
should be extended to include adidSetSortColumn
callback, where the caller can sort the backing data set, and call$(tableView, reloadData)
when done.I'm working on this now; just wanted to capture it via issue. CC @kaadmy