From 654ea09d43e0a5c563d2e78361068c04e9ec4ebf Mon Sep 17 00:00:00 2001 From: Sylvain Bouzols Date: Wed, 20 Nov 2024 16:02:18 +0100 Subject: [PATCH] Refactor(CustomAGGrid): clean component props management (#642) Signed-off-by: sBouzols --- src/components/customAGGrid/customAggrid.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/customAGGrid/customAggrid.tsx b/src/components/customAGGrid/customAggrid.tsx index 597d0f34..7e2708f6 100644 --- a/src/components/customAGGrid/customAggrid.tsx +++ b/src/components/customAGGrid/customAggrid.tsx @@ -37,13 +37,7 @@ const onColumnResized = (params: ColumnResizedEvent) => { }; export const CustomAGGrid = React.forwardRef((props, ref) => { - const { - shouldHidePinnedHeaderRightBorder = false, - overlayNoRowsTemplate, - loadingOverlayComponent, - loadingOverlayComponentParams, - showOverlay = false, - } = props; + const { shouldHidePinnedHeaderRightBorder = false, showOverlay = false, ...agGridReactProps } = props; const theme = useTheme(); const intl = useIntl(); @@ -73,12 +67,9 @@ export const CustomAGGrid = React.forwardRef((pr ref={ref} getLocaleText={getLocaleText} suppressPropertyNamesCheck - loadingOverlayComponent={loadingOverlayComponent} - loadingOverlayComponentParams={loadingOverlayComponentParams} - overlayNoRowsTemplate={overlayNoRowsTemplate} onColumnResized={onColumnResized} enableCellTextSelection - {...props} + {...agGridReactProps} /> );