{"action":"created","issue":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/11215","repository_url":"https://api.github.com/repos/ant-design/ant-design","labels_url":"https://api.github.com/repos/ant-design/ant-design/issues/11215/labels{/name}","comments_url":"https://api.github.com/repos/ant-design/ant-design/issues/11215/comments","events_url":"https://api.github.com/repos/ant-design/ant-design/issues/11215/events","html_url":"https://github.com/ant-design/ant-design/issues/11215","id":339646101,"node_id":"MDU6SXNzdWUzMzk2NDYxMDE=","number":11215,"title":"onDoubleClick of Table onRow doesn't work","user":{"login":"leizhangcnnz","id":1755313,"node_id":"MDQ6VXNlcjE3NTUzMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1755313?v=4","gravatar_id":"","url":"https://api.github.com/users/leizhangcnnz","html_url":"https://github.com/leizhangcnnz","followers_url":"https://api.github.com/users/leizhangcnnz/followers","following_url":"https://api.github.com/users/leizhangcnnz/following{/other_user}","gists_url":"https://api.github.com/users/leizhangcnnz/gists{/gist_id}","starred_url":"https://api.github.com/users/leizhangcnnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leizhangcnnz/subscriptions","organizations_url":"https://api.github.com/users/leizhangcnnz/orgs","repos_url":"https://api.github.com/users/leizhangcnnz/repos","events_url":"https://api.github.com/users/leizhangcnnz/events{/privacy}","received_events_url":"https://api.github.com/users/leizhangcnnz/received_events","type":"User","site_admin":false},"labels":[{"id":340842022,"node_id":"MDU6TGFiZWwzNDA4NDIwMjI=","url":"https://api.github.com/repos/ant-design/ant-design/labels/Need%20Reproduce%F0%9F%A4%94","name":"Need Reproduce🤔","color":"fef2c0","default":false}],"state":"closed","locked":false,"assignee":{"login":"yutingzhao1991","id":1061968,"node_id":"MDQ6VXNlcjEwNjE5Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1061968?v=4","gravatar_id":"","url":"https://api.github.com/users/yutingzhao1991","html_url":"https://github.com/yutingzhao1991","followers_url":"https://api.github.com/users/yutingzhao1991/followers","following_url":"https://api.github.com/users/yutingzhao1991/following{/other_user}","gists_url":"https://api.github.com/users/yutingzhao1991/gists{/gist_id}","starred_url":"https://api.github.com/users/yutingzhao1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutingzhao1991/subscriptions","organizations_url":"https://api.github.com/users/yutingzhao1991/orgs","repos_url":"https://api.github.com/users/yutingzhao1991/repos","events_url":"https://api.github.com/users/yutingzhao1991/events{/privacy}","received_events_url":"https://api.github.com/users/yutingzhao1991/received_events","type":"User","site_admin":false},"assignees":[{"login":"yutingzhao1991","id":1061968,"node_id":"MDQ6VXNlcjEwNjE5Njg=","avatar_url":"https://avatars0.githubusercontent.com/u/1061968?v=4","gravatar_id":"","url":"https://api.github.com/users/yutingzhao1991","html_url":"https://github.com/yutingzhao1991","followers_url":"https://api.github.com/users/yutingzhao1991/followers","following_url":"https://api.github.com/users/yutingzhao1991/following{/other_user}","gists_url":"https://api.github.com/users/yutingzhao1991/gists{/gist_id}","starred_url":"https://api.github.com/users/yutingzhao1991/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yutingzhao1991/subscriptions","organizations_url":"https://api.github.com/users/yutingzhao1991/orgs","repos_url":"https://api.github.com/users/yutingzhao1991/repos","events_url":"https://api.github.com/users/yutingzhao1991/events{/privacy}","received_events_url":"https://api.github.com/users/yutingzhao1991/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2018-07-09T23:53:14Z","updated_at":"2018-07-10T22:57:41Z","closed_at":"2018-07-10T22:57:41Z","author_association":"NONE","body":"- [x] I have searched the [issues](https://github.com/ant-design/ant-design/issues) of this repository and believe that this is not a duplicate.\r\n\r\n### Version\r\n3.4.4\r\n\r\n### Environment\r\nOS: Windows and Ubuntu, Browser IE 11,10,9, Firefox\r\n\r\n### Reproduction link\r\n[https://ant.design/components/table/](https://ant.design/components/table/)\r\n\r\n### Steps to reproduce\r\nTo make it simple, we assume there is a table has two column. The data of column A is a simple text, the data of column B is a list of text. Eg.\r\n```\r\n----------------------\r\n|    A   |     B    |\r\n----------------------\r\n|   data  |    dd1  |\r\n|         |    dd2  |\r\n----------------------\r\n```\r\nThe compiled html is kind like:\r\n```\r\n<tr>\r\n  <td>data</td>\r\n  <td>\r\n    <div>dd1</div>\r\n    <div>dd2</div>\r\n</tr>\r\n```\r\nWe need to add onDoubleClick action on the table row to pop up a promt, add the action to table onRow:\r\n```\r\nonRow={(record) => {\r\n    return {\r\n      onDoubleClick: () => {\r\n         // popup a promt;\r\n      },\r\n    };\r\n```\r\nAt this step, It works well, double click any place, like data cell or \"dd1/dd2\" cell, it wil popup the promt.\r\n\r\nThe we also need the onClick action for the table row, as the usage of onRow saying, we add onClick to the onRow:\r\n```\r\nonRow={(record) => {\r\n    return {\r\n      onDoubleClick: () => {\r\n         // popup a promt;\r\n      },\r\n      onClick: () => {\r\n        // do other things;\r\n      }, \r\n    };\r\n```\r\nAt this step, the double click on the \"data\" cell works well, but the double click on the \"dd1/dd2\" cell doesn't work anymore. Debug the js code I found all the double click on the \"dd1/dd2\" cell changes to two single click. onClick works fine.\r\n\r\nif cell \"dd1/dd2\" has padding, then click the padding of \"dd1/dd2\" cell, on double click works, but click on \"dd1/dd2\" texts or the div of \"dd1/dd2\" doesn't work.\r\n\r\nHowever, if we remove the onClick action in onRow, double click works for all cells, no matter it's click on padding or text.\r\n\r\n### What is expected?\r\nonDoubleClick should works well with onClick for all types of table cells.\r\n\r\n### What is actually happening?\r\nSee the \"Step to reproduce\"\r\n\r\n\r\n<!-- generated by ant-design-issue-helper. DO NOT REMOVE -->"},"comment":{"url":"https://api.github.com/repos/ant-design/ant-design/issues/comments/403991891","html_url":"https://github.com/ant-design/ant-design/issues/11215#issuecomment-403991891","issue_url":"https://api.github.com/repos/ant-design/ant-design/issues/11215","id":403991891,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMzk5MTg5MQ==","user":{"login":"leizhangcnnz","id":1755313,"node_id":"MDQ6VXNlcjE3NTUzMTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1755313?v=4","gravatar_id":"","url":"https://api.github.com/users/leizhangcnnz","html_url":"https://github.com/leizhangcnnz","followers_url":"https://api.github.com/users/leizhangcnnz/followers","following_url":"https://api.github.com/users/leizhangcnnz/following{/other_user}","gists_url":"https://api.github.com/users/leizhangcnnz/gists{/gist_id}","starred_url":"https://api.github.com/users/leizhangcnnz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leizhangcnnz/subscriptions","organizations_url":"https://api.github.com/users/leizhangcnnz/orgs","repos_url":"https://api.github.com/users/leizhangcnnz/repos","events_url":"https://api.github.com/users/leizhangcnnz/events{/privacy}","received_events_url":"https://api.github.com/users/leizhangcnnz/received_events","type":"User","site_admin":false},"created_at":"2018-07-10T22:57:41Z","updated_at":"2018-07-10T22:57:41Z","author_association":"NONE","body":"Sorry, Please close this issue. it's our own code problem. Someone passed a random unique Id to the div of the column cell, and the single click on the div of the column cell will reset the state of the component that contains the ant table. So the twice double click will be taken as two single click on different div, even though the div is the same but with two different unique key, reactjs will take them as different."}}
{"actor":{"display_login":"leizhangcnnz"}}