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

fix(Checkbox): handle click properly on label #3692

Merged
merged 1 commit into from
Jul 7, 2019

Conversation

layershifter
Copy link
Member

Fixes #3683.

@@ -148,8 +148,9 @@ export default class Checkbox extends Component {
const { id } = this.props
const { checked, indeterminate } = this.state

const isLabelClick = _.invoke(this.labelRef.current, 'contains', e.target)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously there was an equality comparison, but in this case contains() should be used.

@codecov-io
Copy link

Codecov Report

Merging #3692 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3692   +/-   ##
=======================================
  Coverage   99.83%   99.83%           
=======================================
  Files         175      175           
  Lines        3116     3116           
=======================================
  Hits         3111     3111           
  Misses          5        5
Impacted Files Coverage Δ
src/modules/Checkbox/Checkbox.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f83dad...9b3c2ec. Read the comment docs.

1 similar comment
@codecov-io
Copy link

Codecov Report

Merging #3692 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3692   +/-   ##
=======================================
  Coverage   99.83%   99.83%           
=======================================
  Files         175      175           
  Lines        3116     3116           
=======================================
  Hits         3111     3111           
  Misses          5        5
Impacted Files Coverage Δ
src/modules/Checkbox/Checkbox.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8f83dad...9b3c2ec. Read the comment docs.

@layershifter layershifter merged commit 905917a into master Jul 7, 2019
@delete-merged-branch delete-merged-branch bot deleted the fix/checkbox-label branch July 7, 2019 16:55
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

Successfully merging this pull request may close these issues.

Checkbox: label only clickable when simple element
2 participants