Skip to content

Commit

Permalink
Refactor(CustomAGGrid): clean component props management (#642)
Browse files Browse the repository at this point in the history
Signed-off-by: sBouzols <[email protected]>
  • Loading branch information
sBouzols authored Nov 20, 2024
1 parent d40f7af commit 654ea09
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions src/components/customAGGrid/customAggrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,7 @@ const onColumnResized = (params: ColumnResizedEvent) => {
};

export const CustomAGGrid = React.forwardRef<AgGridReact, CustomAGGridProps>((props, ref) => {
const {
shouldHidePinnedHeaderRightBorder = false,
overlayNoRowsTemplate,
loadingOverlayComponent,
loadingOverlayComponentParams,
showOverlay = false,
} = props;
const { shouldHidePinnedHeaderRightBorder = false, showOverlay = false, ...agGridReactProps } = props;
const theme = useTheme<Theme>();
const intl = useIntl();

Expand Down Expand Up @@ -73,12 +67,9 @@ export const CustomAGGrid = React.forwardRef<AgGridReact, CustomAGGridProps>((pr
ref={ref}
getLocaleText={getLocaleText}
suppressPropertyNamesCheck
loadingOverlayComponent={loadingOverlayComponent}
loadingOverlayComponentParams={loadingOverlayComponentParams}
overlayNoRowsTemplate={overlayNoRowsTemplate}
onColumnResized={onColumnResized}
enableCellTextSelection
{...props}
{...agGridReactProps}
/>
</Box>
);
Expand Down

0 comments on commit 654ea09

Please sign in to comment.