Skip to content

Commit

Permalink
fix: no need for a flag in refinementList refine()
Browse files Browse the repository at this point in the history
Also, retried stopPropagation stopImmediatePro.. etc. No luck
  • Loading branch information
vvo committed Sep 8, 2015
1 parent 268d51d commit 9b8fa3f
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions components/RefinementList.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,16 @@ class RefinementList extends React.Component {
}

var parent = e.target;
var checkboxInLabel = false;

while (parent !== e.currentTarget) {
if (parent.tagName === 'LABEL' && parent.querySelector('input[type="checkbox"]')) {
checkboxInLabel = true;
return;
}

parent = parent.parentNode;
}

if (checkboxInLabel === false) {
this.refine(value);
}
this.refine(value);
}

render() {
Expand Down

0 comments on commit 9b8fa3f

Please sign in to comment.