{"action":"created","issue":{"url":"https://api.github.com/repos/deltreey/Dable/issues/4","labels_url":"https://api.github.com/repos/deltreey/Dable/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/deltreey/Dable/issues/4/comments","events_url":"https://api.github.com/repos/deltreey/Dable/issues/4/events","html_url":"https://github.com/deltreey/Dable/issues/4","id":57882588,"number":4,"title":"How to initially populate with async data","user":{"login":"glennschmidt","id":1758170,"avatar_url":"https://avatars.githubusercontent.com/u/1758170?v=3","gravatar_id":"","url":"https://api.github.com/users/glennschmidt","html_url":"https://github.com/glennschmidt","followers_url":"https://api.github.com/users/glennschmidt/followers","following_url":"https://api.github.com/users/glennschmidt/following{/other_user}","gists_url":"https://api.github.com/users/glennschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/glennschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennschmidt/subscriptions","organizations_url":"https://api.github.com/users/glennschmidt/orgs","repos_url":"https://api.github.com/users/glennschmidt/repos","events_url":"https://api.github.com/users/glennschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/glennschmidt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-17T04:37:12Z","updated_at":"2015-02-18T05:40:42Z","closed_at":null,"body":"I understand that you can set up Dable to use a server-side data source, like this:\r\n```javascript\r\nmyTable = new Dable('myTable');\r\nmyTable.async = '/data.php';\r\n```\r\n\r\nBut this does not cause data to be loaded initially. It will only make the first AJAX request when the user tries to sort or filter the table. The table will start out empty.\r\n\r\nAlso, when I click any of the column headers to sort, it seems to be doing a **synchronous** HTTP request. Chrome displays a warning in the console:\r\n> Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience."},"comment":{"url":"https://api.github.com/repos/deltreey/Dable/issues/comments/74815798","html_url":"https://github.com/deltreey/Dable/issues/4#issuecomment-74815798","issue_url":"https://api.github.com/repos/deltreey/Dable/issues/4","id":74815798,"user":{"login":"glennschmidt","id":1758170,"avatar_url":"https://avatars.githubusercontent.com/u/1758170?v=3","gravatar_id":"","url":"https://api.github.com/users/glennschmidt","html_url":"https://github.com/glennschmidt","followers_url":"https://api.github.com/users/glennschmidt/followers","following_url":"https://api.github.com/users/glennschmidt/following{/other_user}","gists_url":"https://api.github.com/users/glennschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/glennschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glennschmidt/subscriptions","organizations_url":"https://api.github.com/users/glennschmidt/orgs","repos_url":"https://api.github.com/users/glennschmidt/repos","events_url":"https://api.github.com/users/glennschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/glennschmidt/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T05:40:42Z","updated_at":"2015-02-18T05:40:42Z","body":"Thanks for the quick response.\r\n\r\nI found that `UpdateDisplayedRows()` doesn't cause the data to be requested, so I had to call `BuildAll`, and I had to re-supply the same table ID that I gave to the Dable constructor. ie.\r\n```javascript\r\nmyTable.BuildAll('myTable')\r\n```\r\n\r\nThe synchronous request is due to the function\r\n```javascript\r\n$export.asyncRequest = function (start,\r\n\t\t\t                     filter,\r\n\t\t\t                     sortColumn,\r\n\t\t\t                     ascending,\r\n\t\t\t                     asynchronous)\r\n```\r\nWhenever this function is referenced in the Dable code, it is called with only 4 arguments, so 'asynchronous' defaults to false.\r\n\r\nAfter it makes the request, I'm also having a problem due to this line:\r\n```javascript\r\nvar actualData = JSON.parse(data.d);\r\n```\r\n\r\nFor me, `data` already contains the fully decoded object and `data.d` is undefined. Is it expecting the response to be double-encoded?"}}