{"action":"closed","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/1460","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/1460/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/1460/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/1460/events","html_url":"https://github.com/ant-design/ant-design/issues/1460","id":149706133,"number":1460,"title":"checkbox全选事件，急啊","user":{"login":"yayamommy","id":18112865,"avatar_url":"https://avatars.githubusercontent.com/u/18112865?v=3","gravatar_id":"","url":"https://api.github.com/users/yayamommy","html_url":"https://github.com/yayamommy","followers_url":"https://api.github.com/users/yayamommy/followers","following_url":"https://api.github.com/users/yayamommy/following{/other_user}","gists_url":"https://api.github.com/users/yayamommy/gists{/gist_id}","starred_url":"https://api.github.com/users/yayamommy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yayamommy/subscriptions","organizations_url":"https://api.github.com/users/yayamommy/orgs","repos_url":"https://api.github.com/users/yayamommy/repos","events_url":"https://api.github.com/users/yayamommy/events{/privacy}","received_events_url":"https://api.github.com/users/yayamommy/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-20T09:01:27Z","updated_at":"2016-04-20T10:37:35Z","closed_at":"2016-04-20T10:37:35Z","body":"有个功能是表里有一列都是checkbox，在表下面有个单独的checkbox是全选。单击后会选中表中所有的checkbox。在表里的单个checkbox绑定了onChange事件，如何在全选点击的时候也能调用单选时的onChange事件呢？\r\n\r\n``` java\r\nonSingleChange(id, e) {\r\n// 如果选中，会把这行数据的id保存到一个数组中；取消，从数组中删除id\r\n}\r\n\r\nonMultiChange(e) {\r\n  //页面上把表里的checkbox都设为true或者fale，这个可以实现，check属性用state来设置。但是这样调用不到onSingleChange事件，没法把选中的id添加入数组\r\n}\r\n```\r\n\r\n请各位帮忙下，急求！"}}