Skip to content

Commit

Permalink
corrected checkbox alignment in DataGrid
Browse files Browse the repository at this point in the history
  • Loading branch information
nidhinrajr committed Oct 16, 2024
1 parent c5516eb commit d2f645a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
- Updated Tooltip title type with React.ReactNode from string so as to accept string as well as html node.
- Added `tooltipPlacement` prop to the `MultipleSelectChip`, `Autocomplete` and `Panel` component.
- Updated icon button spacing in Snackbar
- Adjusted checkbox alignment in `DataGrid` component

### Breaking changes

Expand Down
7 changes: 7 additions & 0 deletions src/DataGrid/DataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@ const StyledDataGrid = styled(MuiDataGrid)<DataGridProps>((props) => {
' .MuiDataGrid-cell': {
borderBottom: `1px ${theme.palette.border.secondary} solid`,
},
'& .MuiDataGrid-row': {
'.MuiCheckbox-root': {
marginRight: '0',
},
},
'& .MuiDataGrid-row:hover': {
backgroundColor: theme.palette.action.hover,
'.MuiCheckbox-root': {
Expand Down Expand Up @@ -310,6 +315,8 @@ const DataGrid = ({ components, componentsProps, ...props }: DataGridProps) => {
if (event.key === 'Enter' || event.key === ' ') {
if (rowCheckbox) {
rowCheckbox.click();
} else if (event.key === 'Enter') {
target.click();
}
}
// add navigation control if user press arrow right it will focus on action button on a row
Expand Down

0 comments on commit d2f645a

Please sign in to comment.