{"action":"closed","issue":{"url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/1802","labels_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/1802/labels{/name}","comments_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/1802/comments","events_url":"https://api.github.com/repos/wenzhixin/bootstrap-table/issues/1802/events","html_url":"https://github.com/wenzhixin/bootstrap-table/issues/1802","id":122023347,"number":1802,"title":"refresh方法，数据没有及时加载，点击第二遍才正确加载","user":{"login":"xiegang666","id":16288211,"avatar_url":"https://avatars.githubusercontent.com/u/16288211?v=3","gravatar_id":"","url":"https://api.github.com/users/xiegang666","html_url":"https://github.com/xiegang666","followers_url":"https://api.github.com/users/xiegang666/followers","following_url":"https://api.github.com/users/xiegang666/following{/other_user}","gists_url":"https://api.github.com/users/xiegang666/gists{/gist_id}","starred_url":"https://api.github.com/users/xiegang666/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiegang666/subscriptions","organizations_url":"https://api.github.com/users/xiegang666/orgs","repos_url":"https://api.github.com/users/xiegang666/repos","events_url":"https://api.github.com/users/xiegang666/events{/privacy}","received_events_url":"https://api.github.com/users/xiegang666/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/wenzhixin/bootstrap-table/labels/awaiting%20reply","name":"awaiting reply","color":"d4c5f9"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-14T11:20:23Z","updated_at":"2016-01-15T15:06:13Z","closed_at":"2016-01-15T15:06:13Z","body":"<table id=\"table\"\r\n                    \t   data-toolbar=\"#toolbar\"\r\n                    \t   data-toggle=\"table\"\r\n\t\t\t\t           data-pagination=\"true\"\r\n\t\t\t\t           data-checkbox-header = \"true\"\r\n\t\t\t\t           data-side-pagination=\"server\"\r\n\t\t\t\t           data-page-number = \"1\"\r\n\t\t\t\t           data-page-size = \"5\"\r\n\t\t\t\t           data-page-list = \"[5,10,20,All]\"\r\n\t\t\t\t           data-url=\"$dataUrl\"\r\n\t\t\t\t           data-query-params=\"queryParams\">\r\n\r\n//查询参数传递\r\nfunction queryParams(params) {\r\n\t\t\treturn {\r\n                rows: params.limit,\t// 分页大小\r\n \r\n                page: params.offset/params.limit+1, // 当前页=开始位置/分页大小+1\r\n\r\n                status: $(\"#selStatus\").val(),\t// 状态\r\n            };\r\n\t\t}\r\n\r\n// 查询\r\n\t\t\t$(\"#search\").click(function(){\r\n\t\t\t\t$(\"#table\").bootstrapTable('refresh');\r\n\t\t\t});\r\n\r\n假设第一次输入条件查询，结果为1条数据，接下来把条件重置，重新查询\r\n这是请求服务器的数据是正确返回的，并且分页信息里的总记录数正确，分页也是正确的\r\n就是table数据还是显示一条\r\n\r\n再次点击查询按钮才会显示所有数据"}}