{"action":"created","issue":{"url":"https://api.github.com/repos/gregnb/mui-datatables/issues/305","repository_url":"https://api.github.com/repos/gregnb/mui-datatables","labels_url":"https://api.github.com/repos/gregnb/mui-datatables/issues/305/labels{/name}","comments_url":"https://api.github.com/repos/gregnb/mui-datatables/issues/305/comments","events_url":"https://api.github.com/repos/gregnb/mui-datatables/issues/305/events","html_url":"https://github.com/gregnb/mui-datatables/issues/305","id":388039952,"node_id":"MDU6SXNzdWUzODgwMzk5NTI=","number":305,"title":"Table sort is lost if data changed on a re-render","user":{"login":"joaoaguiam","id":5901730,"node_id":"MDQ6VXNlcjU5MDE3MzA=","avatar_url":"https://avatars1.githubusercontent.com/u/5901730?v=4","gravatar_id":"","url":"https://api.github.com/users/joaoaguiam","html_url":"https://github.com/joaoaguiam","followers_url":"https://api.github.com/users/joaoaguiam/followers","following_url":"https://api.github.com/users/joaoaguiam/following{/other_user}","gists_url":"https://api.github.com/users/joaoaguiam/gists{/gist_id}","starred_url":"https://api.github.com/users/joaoaguiam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joaoaguiam/subscriptions","organizations_url":"https://api.github.com/users/joaoaguiam/orgs","repos_url":"https://api.github.com/users/joaoaguiam/repos","events_url":"https://api.github.com/users/joaoaguiam/events{/privacy}","received_events_url":"https://api.github.com/users/joaoaguiam/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2018-12-06T03:19:47Z","updated_at":"2019-04-15T15:47:31Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"If user has sorted a column and the table data changed afterwards, the table is render with the new data but the sort is not taken into account.\r\n\r\n## Expected Behavior\r\nWhen the table data is updated, the re-rendering of the MUI DataTables should take into account the previously selected sort by the user.\r\n\r\n## Current Behavior\r\nCurrently, in this situation, the rows are back to the initial order and not sorted correctly. However, the column header still indicates the sort icon correctly (based on the previously clicked column).\r\n\r\n## Steps to Reproduce (for bugs)\r\nI am storing the table data in the state and derive it from the props. If the props change, the data in the state is updated. The MUIDataTable component is retrieving the data directly from the state on the render method.\r\n\r\n## Your Environment\r\n| Tech         | Version |\r\n|--------------|---------|\r\n| Material-UI  |      1.4.3   |\r\n| MUI-datatables  |      2.0.0-beta-38   |\r\n| React        |    16.5.0     |\r\n| Browser      |      Chrome   |"},"comment":{"url":"https://api.github.com/repos/gregnb/mui-datatables/issues/comments/483308356","html_url":"https://github.com/gregnb/mui-datatables/issues/305#issuecomment-483308356","issue_url":"https://api.github.com/repos/gregnb/mui-datatables/issues/305","id":483308356,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4MzMwODM1Ng==","user":{"login":"ideoclickVanessa","id":44000426,"node_id":"MDQ6VXNlcjQ0MDAwNDI2","avatar_url":"https://avatars1.githubusercontent.com/u/44000426?v=4","gravatar_id":"","url":"https://api.github.com/users/ideoclickVanessa","html_url":"https://github.com/ideoclickVanessa","followers_url":"https://api.github.com/users/ideoclickVanessa/followers","following_url":"https://api.github.com/users/ideoclickVanessa/following{/other_user}","gists_url":"https://api.github.com/users/ideoclickVanessa/gists{/gist_id}","starred_url":"https://api.github.com/users/ideoclickVanessa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ideoclickVanessa/subscriptions","organizations_url":"https://api.github.com/users/ideoclickVanessa/orgs","repos_url":"https://api.github.com/users/ideoclickVanessa/repos","events_url":"https://api.github.com/users/ideoclickVanessa/events{/privacy}","received_events_url":"https://api.github.com/users/ideoclickVanessa/received_events","type":"User","site_admin":false},"created_at":"2019-04-15T15:47:31Z","updated_at":"2019-04-15T15:47:31Z","author_association":"NONE","body":"@gregnb While we no longer seem to experience \"sort order\" loss with `2.0.0-beta.59`, we do still experience \"rows per page\" and \"current page\" loss."}}
{"actor":{"display_login":"ideoclickVanessa"}}