Skip to content

Commit

Permalink
Merge pull request #331 from sudhanshutech/fix/chore1
Browse files Browse the repository at this point in the history
bug(components): remove extra div wrapper
  • Loading branch information
nebula-aac authored Nov 14, 2023
2 parents 7e32aa5 + abfdb95 commit f30786a
Showing 1 changed file with 26 additions and 28 deletions.
54 changes: 26 additions & 28 deletions packages/components/src/custom/CustomColumnVisibilityControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -87,34 +87,32 @@ const CustomColumnVisibilityControl = React.forwardRef<
]}
// transition
>
<div>
<ClickAwayListener onClickAway={handleClose}>
<Paper
sx={{
padding: '1rem',
boxShadow: open ? '0px 4px 8px rgba(0, 0, 0, 0.2)' : 'none',
background: '#f4f5f7'
}}
>
<div style={{ display: 'flex', flexDirection: 'column' }}>
{columns.map((col) => (
<FormControlLabel
key={col.name}
control={
<Checkbox
checked={customToolsProps.columnVisibility[col.name]}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
handleColumnVisibilityChange(col.name, e.target.checked)
}
/>
}
label={col.label}
/>
))}
</div>
</Paper>
</ClickAwayListener>
</div>
<ClickAwayListener onClickAway={handleClose}>
<Paper
sx={{
padding: '1rem',
boxShadow: open ? '0px 4px 8px rgba(0, 0, 0, 0.2)' : 'none',
background: '#f4f5f7'
}}
>
<div style={{ display: 'flex', flexDirection: 'column' }}>
{columns.map((col) => (
<FormControlLabel
key={col.name}
control={
<Checkbox
checked={customToolsProps.columnVisibility[col.name]}
onChange={(e: React.ChangeEvent<HTMLInputElement>) =>
handleColumnVisibilityChange(col.name, e.target.checked)
}
/>
}
label={col.label}
/>
))}
</div>
</Paper>
</ClickAwayListener>
</Popper>
</div>
);
Expand Down

0 comments on commit f30786a

Please sign in to comment.