{"action":"closed","issue":{"url":"https://api.github.com/repos/UDA-EJIE/udaRUP/issues/91","repository_url":"https://api.github.com/repos/UDA-EJIE/udaRUP","labels_url":"https://api.github.com/repos/UDA-EJIE/udaRUP/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/UDA-EJIE/udaRUP/issues/91/comments","events_url":"https://api.github.com/repos/UDA-EJIE/udaRUP/issues/91/events","html_url":"https://github.com/UDA-EJIE/udaRUP/issues/91","id":298327985,"node_id":"MDU6SXNzdWUyOTgzMjc5ODU=","number":91,"title":"[rup_table] ReloadGrid selecciona un registro o no (v3.3.0)","user":{"login":"GardiHuts","id":11626735,"node_id":"MDQ6VXNlcjExNjI2NzM1","avatar_url":"https://avatars1.githubusercontent.com/u/11626735?v=4","gravatar_id":"","url":"https://api.github.com/users/GardiHuts","html_url":"https://github.com/GardiHuts","followers_url":"https://api.github.com/users/GardiHuts/followers","following_url":"https://api.github.com/users/GardiHuts/following{/other_user}","gists_url":"https://api.github.com/users/GardiHuts/gists{/gist_id}","starred_url":"https://api.github.com/users/GardiHuts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GardiHuts/subscriptions","organizations_url":"https://api.github.com/users/GardiHuts/orgs","repos_url":"https://api.github.com/users/GardiHuts/repos","events_url":"https://api.github.com/users/GardiHuts/events{/privacy}","received_events_url":"https://api.github.com/users/GardiHuts/received_events","type":"User","site_admin":false},"labels":[{"id":210037665,"node_id":"MDU6TGFiZWwyMTAwMzc2NjU=","url":"https://api.github.com/repos/UDA-EJIE/udaRUP/labels/bug","name":"bug","color":"fc2929","default":true},{"id":612870670,"node_id":"MDU6TGFiZWw2MTI4NzA2NzA=","url":"https://api.github.com/repos/UDA-EJIE/udaRUP/labels/ready%20to%20merge","name":"ready to merge","color":"d4c5f9","default":false}],"state":"closed","locked":false,"assignee":{"login":"xaabi6","id":22637294,"node_id":"MDQ6VXNlcjIyNjM3Mjk0","avatar_url":"https://avatars0.githubusercontent.com/u/22637294?v=4","gravatar_id":"","url":"https://api.github.com/users/xaabi6","html_url":"https://github.com/xaabi6","followers_url":"https://api.github.com/users/xaabi6/followers","following_url":"https://api.github.com/users/xaabi6/following{/other_user}","gists_url":"https://api.github.com/users/xaabi6/gists{/gist_id}","starred_url":"https://api.github.com/users/xaabi6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaabi6/subscriptions","organizations_url":"https://api.github.com/users/xaabi6/orgs","repos_url":"https://api.github.com/users/xaabi6/repos","events_url":"https://api.github.com/users/xaabi6/events{/privacy}","received_events_url":"https://api.github.com/users/xaabi6/received_events","type":"User","site_admin":false},"assignees":[{"login":"xaabi6","id":22637294,"node_id":"MDQ6VXNlcjIyNjM3Mjk0","avatar_url":"https://avatars0.githubusercontent.com/u/22637294?v=4","gravatar_id":"","url":"https://api.github.com/users/xaabi6","html_url":"https://github.com/xaabi6","followers_url":"https://api.github.com/users/xaabi6/followers","following_url":"https://api.github.com/users/xaabi6/following{/other_user}","gists_url":"https://api.github.com/users/xaabi6/gists{/gist_id}","starred_url":"https://api.github.com/users/xaabi6/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xaabi6/subscriptions","organizations_url":"https://api.github.com/users/xaabi6/orgs","repos_url":"https://api.github.com/users/xaabi6/repos","events_url":"https://api.github.com/users/xaabi6/events{/privacy}","received_events_url":"https://api.github.com/users/xaabi6/received_events","type":"User","site_admin":false},{"login":"hmartinez85","id":34453480,"node_id":"MDQ6VXNlcjM0NDUzNDgw","avatar_url":"https://avatars2.githubusercontent.com/u/34453480?v=4","gravatar_id":"","url":"https://api.github.com/users/hmartinez85","html_url":"https://github.com/hmartinez85","followers_url":"https://api.github.com/users/hmartinez85/followers","following_url":"https://api.github.com/users/hmartinez85/following{/other_user}","gists_url":"https://api.github.com/users/hmartinez85/gists{/gist_id}","starred_url":"https://api.github.com/users/hmartinez85/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hmartinez85/subscriptions","organizations_url":"https://api.github.com/users/hmartinez85/orgs","repos_url":"https://api.github.com/users/hmartinez85/repos","events_url":"https://api.github.com/users/hmartinez85/events{/privacy}","received_events_url":"https://api.github.com/users/hmartinez85/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/UDA-EJIE/udaRUP/milestones/14","html_url":"https://github.com/UDA-EJIE/udaRUP/milestone/14","labels_url":"https://api.github.com/repos/UDA-EJIE/udaRUP/milestones/14/labels","id":3341260,"node_id":"MDk6TWlsZXN0b25lMzM0MTI2MA==","number":14,"title":"v3.5.0","description":"","creator":{"login":"sergisu","id":11539034,"node_id":"MDQ6VXNlcjExNTM5MDM0","avatar_url":"https://avatars3.githubusercontent.com/u/11539034?v=4","gravatar_id":"","url":"https://api.github.com/users/sergisu","html_url":"https://github.com/sergisu","followers_url":"https://api.github.com/users/sergisu/followers","following_url":"https://api.github.com/users/sergisu/following{/other_user}","gists_url":"https://api.github.com/users/sergisu/gists{/gist_id}","starred_url":"https://api.github.com/users/sergisu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergisu/subscriptions","organizations_url":"https://api.github.com/users/sergisu/orgs","repos_url":"https://api.github.com/users/sergisu/repos","events_url":"https://api.github.com/users/sergisu/events{/privacy}","received_events_url":"https://api.github.com/users/sergisu/received_events","type":"User","site_admin":false},"open_issues":9,"closed_issues":3,"state":"open","created_at":"2018-05-12T15:30:34Z","updated_at":"2018-07-06T12:01:15Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2018-02-19T16:05:42Z","updated_at":"2018-07-06T12:01:15Z","closed_at":"2018-07-06T12:01:14Z","author_association":"NONE","body":"Tenemos una tabla multiselección y al hacerle un \"reloadGrid\" siempre selecciona el primer registro. Hemos intentado deseleccionarlo en varios de los eventos que lanza la tabla al cargarse (jqGridAfterGridComplete, loadComplete...) pero estos se ejecutan siempre antes de que acabe el reload y este al final selecciona un registro.\r\n\r\nTambién esta ocurriendo, por esta misma funcionalidad, que si ya tienes seleccionado el primer registro al hacer el reload, se carga deseleccionado, comportándose \"diferente\" dependiendo del estado de la tabla.\r\n\r\nComo posible solución/mejora se nos ocurre añadir un parámetro al reloadGrid que indique que no queremos seleccionar el primer registro para así no cambiar el funcionamiento por defecto:\r\n\r\n```\r\njQuery.fn.rup_table(\"extend\", {\r\n    reloadGrid: function (async, notSelectFirst) {\r\n          var $self = this,\r\n                settings = $self.data(\"settings\"),\r\n                page = $self.rup_table('getGridParam', 'page');\r\n          var ajaxOptions = $self.jqGrid('getGridParam', 'ajaxGridOptions');\r\n          var ajaxOptionsAsync = ajaxOptions.async;\r\n          ajaxOptions.async = false;\r\n          //  var ajaxOptions = $self.jqGrid(\"setGridParam\", {ajaxGridOptions:ajaxOptions});\r\n          $self.jqGrid('setGridParam', {\r\n              ajaxGridOptions: ajaxOptions\r\n          });\r\n \t\t\r\n          $self.jqGrid('setGridParam', {\r\n              page: 1\r\n          });\r\n          $self.trigger('reloadGrid');\r\n          ajaxOptions.async = true;\r\n          $self.jqGrid('setGridParam', {\r\n              ajaxGridOptions: ajaxOptions\r\n          });\r\n          if(!notSelectFirst){\r\n              var nextPagePos = jQuery.proxy(jQuery.jgrid.getCurrPos, $self[0])();\r\n              $self.jqGrid('setSelection', nextPagePos[1][0]);\r\n          }\r\n     }\r\n });\r\n\r\n```\r\nSe puede ver en la x21 en el ejemplo de tabla multiseleccion llamando al reloadGrid.\r\n```\r\n$(\"#table\").rup_table(\"reloadGrid\");\r\n```\r\n\r\n"}}
{"actor":{"display_login":"xaabi6"}}