{"action":"opened","issue":{"url":"https://api.github.com/repos/olifolkerd/tabulator/issues/641","repository_url":"https://api.github.com/repos/olifolkerd/tabulator","labels_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/641/labels{/name}","comments_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/641/comments","events_url":"https://api.github.com/repos/olifolkerd/tabulator/issues/641/events","html_url":"https://github.com/olifolkerd/tabulator/issues/641","id":265823955,"number":641,"title":"Sorting of empty cells and row groups","user":{"login":"tomheaps","id":13905479,"avatar_url":"https://avatars2.githubusercontent.com/u/13905479?v=4","gravatar_id":"","url":"https://api.github.com/users/tomheaps","html_url":"https://github.com/tomheaps","followers_url":"https://api.github.com/users/tomheaps/followers","following_url":"https://api.github.com/users/tomheaps/following{/other_user}","gists_url":"https://api.github.com/users/tomheaps/gists{/gist_id}","starred_url":"https://api.github.com/users/tomheaps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tomheaps/subscriptions","organizations_url":"https://api.github.com/users/tomheaps/orgs","repos_url":"https://api.github.com/users/tomheaps/repos","events_url":"https://api.github.com/users/tomheaps/events{/privacy}","received_events_url":"https://api.github.com/users/tomheaps/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-10-16T16:02:12Z","updated_at":"2017-10-16T16:02:12Z","closed_at":null,"author_association":"NONE","body":"I am using a custom sorting function on one of my columns with field name of \"los\" using data from a different column with field name \"elapsed\":\r\n\r\n```\r\n sorter: function(a, b, aRow, bRow, sorterParams) {\r\n          return (aRow.getData().elapsed) - (bRow.getData().elapsed);\r\n        }\r\n```\r\n\r\nI would like to achieve 2 things:\r\n\r\n1. when I sort the \"los\" column with the custom sorter function, if any of the cells in \"elapsed\" are empty, I would like the rows containing these empty cells to remain at the bottom, not come to the top when dir=\"asc\"\r\n\r\ni.e what I want to achieve is:\r\n\r\n![image](https://user-images.githubusercontent.com/13905479/31621533-d9522a9a-b291-11e7-95a3-316976bd0f00.png)\r\n\r\nbut the default sorting behaviour of tabulator is resulting in:\r\n\r\n![image](https://user-images.githubusercontent.com/13905479/31621588-ffb03588-b291-11e7-8fd0-a68ff3ae0d22.png)\r\n\r\n2. I have several row groups dictated by another (invisible) column field. When I sort using a custom sorting function I would like the row groups to remain static and the rows within them to be sorted according to the criteria above. Currently tabulator will move the row groups up and down depending on the values of cells in the rows within them. A similar question was raised in issue #483 but the solution given would not work with custom sorter functions as it relies on replacing the sorting function with a `headerClick` function that has to be the same for all columns?\r\n\r\nIf these things are not possible, would you consider adding into a future tabulator release ability to 'ignore blanks' on sorting and 'fix row groups' on sorting?"}}
{"actor":{"display_login":"tomheaps"}}