{"action":"opened","issue":{"url":"https://api.github.com/repos/kartik-v/yii2-grid/issues/495","repository_url":"https://api.github.com/repos/kartik-v/yii2-grid","labels_url":"https://api.github.com/repos/kartik-v/yii2-grid/issues/495/labels{/name}","comments_url":"https://api.github.com/repos/kartik-v/yii2-grid/issues/495/comments","events_url":"https://api.github.com/repos/kartik-v/yii2-grid/issues/495/events","html_url":"https://github.com/kartik-v/yii2-grid/issues/495","id":158404939,"number":495,"title":"Using 'scrollTo' pjax setting in GridView","user":{"login":"almirb","id":1752962,"avatar_url":"https://avatars.githubusercontent.com/u/1752962?v=3","gravatar_id":"","url":"https://api.github.com/users/almirb","html_url":"https://github.com/almirb","followers_url":"https://api.github.com/users/almirb/followers","following_url":"https://api.github.com/users/almirb/following{/other_user}","gists_url":"https://api.github.com/users/almirb/gists{/gist_id}","starred_url":"https://api.github.com/users/almirb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/almirb/subscriptions","organizations_url":"https://api.github.com/users/almirb/orgs","repos_url":"https://api.github.com/users/almirb/repos","events_url":"https://api.github.com/users/almirb/events{/privacy}","received_events_url":"https://api.github.com/users/almirb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-03T16:26:25Z","updated_at":"2016-06-03T16:26:25Z","closed_at":null,"body":"Hello,\r\n\r\nI changed my actionDelete to support pjax requests:\r\n````php\r\npublic function actionDelete($id)\r\n    {\r\n        $this->findModel($id)->delete();\r\n\r\n        return Yii::$app->getResponse()->redirect(Yii::$app->request->referrer, 302, false);\r\n    }\r\n````\r\n\r\nIt worked well, but after deleting and refreshing the grid, the page scrolls to top. That's annoying... but I fixed It with:\r\n````js\r\n$.pjax.defaults.scrollTo = false;\r\n````\r\nAlso tried to put this setting internally into my gridview with the code below, to avoid global changes in my pjax configuration:\r\n\r\n````php\r\n'pjaxSettings' => ['options' => ['scrollTo' => false]],\r\n````\r\nBut It didn't work.\r\n\r\nHow can I disable scrollTop only in my gridviews?\r\n\r\nThanks!"}}
{"actor":{"display_login":"almirb"}}