File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -35,19 +35,21 @@ const Columns = ({
3535 className = { menuItemClassName }
3636 padding = "0.25rem 0.75rem"
3737 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+ } }
3941 >
4042 < input
41- id = { `rdt-columns-${ name } -${ index } ` }
4243 name = { name }
4344 type = "checkbox"
4445 style = { { margin : 5 } }
4546 checked = { - 1 !== visibleColumnIds . indexOf ( index ) }
46- onChange = { ( event ) => (
47+ onClick = { ( event ) => event . stopPropagation ( ) }
48+ onChange = { ( event ) => {
4749 action ( SET_VISIBLE_COLUMN_IDS ) ( { index, checked : event . target . checked , width } )
48- ) }
50+ } }
4951 />
50- < label > { label } </ label >
52+ { label }
5153 </ Dropdown . Item >
5254 ) ) }
5355 </ Dropdown . Menu >
Original file line number Diff line number Diff line change @@ -37,8 +37,7 @@ export const Menu = styled.div `
3737 ` } ;
3838` ;
3939
40- export const Item = styled . label `
41- display: block;
40+ export const Item = styled . div `
4241 clear: both;
4342 text-align: inherit;
4443 white-space: nowrap;
You can’t perform that action at this time.
0 commit comments