Skip to content

Commit 3049ab3

Browse files
authored
Merge pull request #478 from plotly/checkbox-label-clickable
clicking on checkbox label should select it
2 parents 48f558a + 52770e0 commit 3049ab3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/components/widgets/CheckboxGroup.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ class CheckboxGroup extends Component {
4747
</div>
4848
)}
4949
</div>
50-
<div className="checkbox__label">{option.label}</div>
50+
<div className="checkbox__label" onClick={() => this.handleChange(i)}>
51+
{option.label}
52+
</div>
5153
</div>
5254
);
5355
});

src/styles/components/widgets/_checkbox.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
line-height: 20px;
6767
text-align: left;
6868
vertical-align: middle;
69+
cursor: pointer;
6970
}
7071
}
7172

0 commit comments

Comments
 (0)