Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CheckboxItem组件的onChange事件响应了两次且事件对象不一致 #689

Closed
xaviertung opened this issue Dec 29, 2016 · 2 comments
Closed
Assignees

Comments

@xaviertung
Copy link

本地环境

-操作系统:windows 10 pro

  • antd-mobile 版本:0.9.13
  • 浏览器 (或标明是 react-native) 及其版本:Chrome
  • 运行环境及其版本:

你做了什么?

组件中引入了CheckboxItem组件,并且组件调用了handleIsMemberChange方法:
<CheckboxItem onChange={this.handleIsMemberChange.bind(this)}>demo</CheckboxItem>
handleIsMemberChange(e) { console.log("member is:", e);}

你期待的结果是:

点击复选框时,触发一次onChange方法

实际上的结果:

点击复选框时,触发了两次onChange方法,经打印对象可以确定,事件对象e不是同一种:
1:member is: Object {target: Object}
2:member is: Object {dispatchConfig: Object, _targetInst: ReactDOMComponent, _dispatchListeners: Array[2], _dispatchInstances: Array[2], nativeEvent: MouseEvent…}

@warmhug warmhug self-assigned this Dec 29, 2016
@warmhug
Copy link
Contributor

warmhug commented Dec 29, 2016

感谢反馈,已修复

@lock
Copy link

lock bot commented May 28, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants