Skip to content

Commit

Permalink
[core] Remove unecessary dispalyName
Browse files Browse the repository at this point in the history
  • Loading branch information
oliviertassinari committed Jun 13, 2021
1 parent 80efc8f commit 352f93b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 13 deletions.
4 changes: 2 additions & 2 deletions packages/grid/_modules_/grid/components/GridRenderingZone.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { ElementSize } from '../models';
type WithChildren = { children?: React.ReactNode };

export const GridRenderingZone = React.forwardRef<HTMLDivElement, ElementSize & WithChildren>(
({ height, width, children }, ref) => {
function GridRenderingZone(props, ref) {
const { height, width, children } = props;
return (
<div
ref={ref}
Expand All @@ -19,4 +20,3 @@ export const GridRenderingZone = React.forwardRef<HTMLDivElement, ElementSize &
);
},
);
GridRenderingZone.displayName = 'GridRenderingZone';
6 changes: 2 additions & 4 deletions packages/grid/_modules_/grid/components/GridRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export interface GridRowProps {
children: React.ReactNode;
}

export const GridRow = (props: GridRowProps) => {
export function GridRow(props: GridRowProps) {
const { selected, id, className, rowIndex, children } = props;
const ariaRowIndex = rowIndex + 2; // 1 for the header row and 1 as it's 1 based
const apiRef = React.useContext(GridApiContext);
Expand Down Expand Up @@ -80,6 +80,4 @@ export const GridRow = (props: GridRowProps) => {
{children}
</div>
);
};

GridRow.displayName = 'GridRow';
}
3 changes: 1 addition & 2 deletions packages/grid/_modules_/grid/components/GridViewport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import {
type ViewportType = React.ForwardRefExoticComponent<React.RefAttributes<HTMLDivElement>>;

export const GridViewport: ViewportType = React.forwardRef<HTMLDivElement, {}>(
(props, renderingZoneRef) => {
function GridViewport(props, renderingZoneRef) {
const apiRef = React.useContext(GridApiContext);

const options = useGridSelector(apiRef, optionsSelector);
Expand Down Expand Up @@ -101,4 +101,3 @@ export const GridViewport: ViewportType = React.forwardRef<HTMLDivElement, {}>(
);
},
);
GridViewport.displayName = 'GridViewport';
4 changes: 1 addition & 3 deletions packages/grid/_modules_/grid/components/cell/GridCell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export interface GridCellProps {
tabIndex: 0 | -1;
}

export const GridCell = React.memo((props: GridCellProps) => {
export const GridCell = React.memo(function GridCell(props: GridCellProps) {
const {
align,
className,
Expand Down Expand Up @@ -178,5 +178,3 @@ export const GridCell = React.memo((props: GridCellProps) => {
</div>
);
});

GridCell.displayName = 'GridCell';
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ interface RowCellsProps {
editRowState?: GridEditRowProps;
}

export const GridRowCells = React.memo((props: RowCellsProps) => {
export const GridRowCells = React.memo(function GridRowCells(props: RowCellsProps) {
const {
columns,
firstColIdx,
Expand Down Expand Up @@ -128,4 +128,3 @@ export const GridRowCells = React.memo((props: RowCellsProps) => {
</React.Fragment>
);
});
GridRowCells.displayName = 'GridRowCells';

0 comments on commit 352f93b

Please sign in to comment.