Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data grid] Improve vertical scrolling performance #11924

Merged
merged 7 commits into from
Feb 8, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
lint
  • Loading branch information
romgrk committed Feb 8, 2024
commit e8619735df659c482ef04d9b31797d83ba9016ed
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/components/GridRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ const GridRow = React.forwardRef<HTMLDivElement, GridRowProps>(function GridRow(
{...other}
>
{leftCells}
<div className={gridClasses.offsetCell} role="presentation" />
<div className={gridClasses.cellOffset} role="presentation" />
{cells}
{emptyCellWidth > 0 && <EmptyCell width={emptyCellWidth} />}
{rightCells.length > 0 && <div role="presentation" style={{ flex: '1' }} />}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ export const GridRootStyles = styled('div', {
},
},
},
[`& .${c.offsetCell}`]: {
[`& .${c.cellOffset}`]: {
flex: '0 0 auto',
display: 'inline-block',
width: 'var(--DataGrid-offsetLeft)',
Expand Down
5 changes: 5 additions & 0 deletions packages/x-data-grid/src/constants/gridClasses.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ export interface GridClasses {
* Styles applied to the skeleton cell element.
*/
cellSkeleton: string;
/**
* Styles applied to the left offset cell element.
*/
cellOffset: string;
/**
* Styles applied to the selection checkbox element.
*/
Expand Down Expand Up @@ -634,6 +638,7 @@ export const gridClasses = generateUtilityClasses<GridClassKey>('MuiDataGrid', [
'cellCheckbox',
'cellEmpty',
'cellSkeleton',
'cellOffset',
'checkboxInput',
'columnHeader--alignCenter',
'columnHeader--alignLeft',
Expand Down
Loading