ant-design-icons
ant-design-icons copied to clipboard
can't set onMouseEnter listener of Icons
- [ √] I have searched the issues of this repository and believe that this is not a duplicate.
Reproduction link
Steps to reproduce
just see screenshot
What is expected?
No error report
What is actually happening?
tsc compile error
Environment | Info |
---|---|
antd | 4.0.4 |
React | 4.0.3 |
System | win10pro1909 |
Browser | electron8.1.1 |
Hello @tjx666. We totally like your proposal/feedback, welcome to send us a Pull Request for it. Please send your Pull Request to proper branch (feature branch for the new feature, master for bugfix and other changes), fill the Pull Request Template here, provide changelog/TypeScript/documentation/test cases if needed and make sure CI passed, we will review it soon. Appreciate it advance and we are looking forward to your contribution!
你好 @tjx666, 我们完全同意你的提议/反馈,欢迎直接在此仓库 创建一个 Pull Request 来解决这个问题。请将 Pull Request 发到正确的分支(新特性发到 feature 分支,其他发到 master 分支),务必填写 Pull Request 内的预设模板,提供改动所需相应的 changelog、TypeScript 定义、测试用例、文档等,并确保 CI 通过,我们会尽快进行 Review,提前感谢和期待您的贡献!
Temporary workaround
@vagusX Is this related to https://github.com/ant-design/ant-design-icons/commit/fb390340eba8f44b1381eaf25afee1f31518c425#diff-917d780e4b5b0637839647e8ca200661R30 ?
@vagusX Is this related to fb39034#diff-917d780e4b5b0637839647e8ca200661R30 ?
According to v3-stable https://github.com/ant-design/ant-design/blob/3.x-stable/components/icon/index.tsx#L62 and v4 still use the same IconProps
interface, so the conclusion is that we have never supported html element event listeners except onKeyUp
and onClick
.
So, @tjx666 you can wrap a to listen mouse event to get the workground.
What's more, @afc163 should we support all those event listeners?
I have change my code logic and need not to listen those events, but I think those events are needed in some case.
We should, actually we support to pass all rest props into html element but our type definition does not.