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

onClick(boolean) warning in rating.js #14

Open
qwadzie opened this issue Nov 12, 2017 · 0 comments
Open

onClick(boolean) warning in rating.js #14

qwadzie opened this issue Nov 12, 2017 · 0 comments

Comments

@qwadzie
Copy link

qwadzie commented Nov 12, 2017

warning in chrome: Warning: Expected onClick listener to be a function, instead got a value of boolean type. It still works though.
for this code in render():
onClick={!this.props.readonly && this.setRating.bind(this, i)}
onMouseOver={!this.props.readonly && this.setTemp.bind(this, i)}
Instead, if you do this, no warning:
onClick = { !this.props.readonly ? this.setRating.bind(this,i) : null}
onMouseOver= { !this.props.readonly ? this.setTemp.bind(this,i) : null}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant