File tree 2 files changed +8
-7
lines changed
2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,21 @@ const Columns = ({
35
35
className = { menuItemClassName }
36
36
padding = "0.25rem 0.75rem"
37
37
styles = { styles . dropdownItem }
38
- htmlFor = { `rdt-columns-${ name } -${ index } ` }
38
+ onClick = { ( event ) => {
39
+ action ( SET_VISIBLE_COLUMN_IDS ) ( { index, checked : ! event . target . firstChild . checked , width } )
40
+ } }
39
41
>
40
42
< input
41
- id = { `rdt-columns-${ name } -${ index } ` }
42
43
name = { name }
43
44
type = "checkbox"
44
45
style = { { margin : 5 } }
45
46
checked = { - 1 !== visibleColumnIds . indexOf ( index ) }
46
- onChange = { ( event ) => (
47
+ onClick = { ( event ) => event . stopPropagation ( ) }
48
+ onChange = { ( event ) => {
47
49
action ( SET_VISIBLE_COLUMN_IDS ) ( { index, checked : event . target . checked , width } )
48
- ) }
50
+ } }
49
51
/>
50
- < label > { label } </ label >
52
+ { label }
51
53
</ Dropdown . Item >
52
54
) ) }
53
55
</ Dropdown . Menu >
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ export const Menu = styled.div `
37
37
` } ;
38
38
` ;
39
39
40
- export const Item = styled . label `
41
- display: block;
40
+ export const Item = styled . div `
42
41
clear: both;
43
42
text-align: inherit;
44
43
white-space: nowrap;
You can’t perform that action at this time.
0 commit comments