{"action":"closed","issue":{"url":"https://api.github.com/repos/yajra/laravel-datatables/issues/1608","repository_url":"https://api.github.com/repos/yajra/laravel-datatables","labels_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/1608/labels{/name}","comments_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/1608/comments","events_url":"https://api.github.com/repos/yajra/laravel-datatables/issues/1608/events","html_url":"https://github.com/yajra/laravel-datatables/issues/1608","id":295055593,"number":1608,"title":"Ajax request fired two times when using \"responsive:true\"","user":{"login":"tiipiik","id":3844253,"avatar_url":"https://avatars2.githubusercontent.com/u/3844253?v=4","gravatar_id":"","url":"https://api.github.com/users/tiipiik","html_url":"https://github.com/tiipiik","followers_url":"https://api.github.com/users/tiipiik/followers","following_url":"https://api.github.com/users/tiipiik/following{/other_user}","gists_url":"https://api.github.com/users/tiipiik/gists{/gist_id}","starred_url":"https://api.github.com/users/tiipiik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiipiik/subscriptions","organizations_url":"https://api.github.com/users/tiipiik/orgs","repos_url":"https://api.github.com/users/tiipiik/repos","events_url":"https://api.github.com/users/tiipiik/events{/privacy}","received_events_url":"https://api.github.com/users/tiipiik/received_events","type":"User","site_admin":false},"labels":[{"id":469660497,"url":"https://api.github.com/repos/yajra/laravel-datatables/labels/out%20of%20scope","name":"out of scope","color":"d93f0b","default":false},{"id":67904193,"url":"https://api.github.com/repos/yajra/laravel-datatables/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-07T09:01:32Z","updated_at":"2018-02-07T14:27:43Z","closed_at":"2018-02-07T14:27:43Z","author_association":"NONE","body":"I was having a problem of ajax request fired two times on page load and don't know why, but I finally find.\r\nI'm using server side processing, and if I use \"responsive:true\" the ajax request is fired two times. If i use \"responsive:false\" or remove \"responsive\" everything is fine and the resquest is fired only once.\r\n\r\n\r\n```javascript\r\n\r\n        var vDataTable = $('#second-data-table');\r\n        var datatable_url = vDataTable.data('url');\r\n        var $filterTag = $('.filter-tag');\r\n        var dataTable = vDataTable.DataTable({\r\n            stateSave: true,\r\n            responsive: true, // If set to true the ajax request is fired two times\r\n            processing: true,\r\n            serverSide: true,\r\n            deferRender: true,\r\n            ajax: {\r\n                url: datatable_url,\r\n                data: function (d) {\r\n                    var tag = $filterTag.val();\r\n                    if (tag) {\r\n                        d.tag = tag;\r\n                    }\r\n                }\r\n            },\r\n            columns: [\r\n                { data: 'id', name: 'id' }\r\n            ],\r\n        });\r\n```\r\n\r\n\r\n- Operating System\r\n- PHP Version : 7.1\r\n- Laravel Version : 5.5\r\n- Laravel-Datatables Version : lastest\r\n"}}
{"actor":{"display_login":"tiipiik"}}