fix(sort): Make sorting of rows work with function

Close #288