diff --git a/src/ApolloSpreadsheet.tsx b/src/ApolloSpreadsheet.tsx index fb4432c..e6c4304 100755 --- a/src/ApolloSpreadsheet.tsx +++ b/src/ApolloSpreadsheet.tsx @@ -309,7 +309,7 @@ export const ApolloSpreadSheet: React.FC = forwardRef( mergedPositions={mergedPositions} isMerged={isMerged} // onRowCollapse={props?.onRowCollapseChange} - // displayCollapseIcon={props?.displayCollapseIcon} + displayCollapseIcon={props?.displayCollapseIcon} nestedRowsProps={nestedRowsProps} theme={theme} coreId={`core-${props?.id}`} diff --git a/src/ApolloSpreadsheetProps.tsx b/src/ApolloSpreadsheetProps.tsx index 4c7b9a3..36b1b6b 100755 --- a/src/ApolloSpreadsheetProps.tsx +++ b/src/ApolloSpreadsheetProps.tsx @@ -94,6 +94,10 @@ export interface ApolloLayoutProps { * Optional renderer to be used in place of rows when either :rowCount or :columnCount is 0. */ noContentOverlay?: () => ReactNode + /** + * Toggle icon display in Collapses + */ + displayCollapseIcon?: boolean } export interface ApolloCoreProps { diff --git a/src/gridWrapper/GridWrapper.tsx b/src/gridWrapper/GridWrapper.tsx index 03e6c9e..0618368 100755 --- a/src/gridWrapper/GridWrapper.tsx +++ b/src/gridWrapper/GridWrapper.tsx @@ -70,7 +70,7 @@ const GridWrapper: React.FC = React.memo( rowHeight, noContentOverlay, onRowCollapse, - //displayCollapseIcon = true, + displayCollapseIcon = true, coreId, }) => { const logger = useLogger('GridWrapper') @@ -309,7 +309,7 @@ const GridWrapper: React.FC = React.memo( const component = (
1 ? { marginLeft: nestedMargin } : {}}> {cell.value} - {/* {displayCollapseIcon ? renderExpandOrCollapseIcon() : null} */} + {displayCollapseIcon ? renderExpandOrCollapseIcon() : null}
) return wrapper(component) @@ -336,6 +336,7 @@ const GridWrapper: React.FC = React.memo( nestedRowsProps, highlightBorderColor, apiRef, + displayCollapseIcon, onRowCollapse, logger, ], diff --git a/src/gridWrapper/gridWrapperProps.ts b/src/gridWrapper/gridWrapperProps.ts index e13430a..6bd8df4 100755 --- a/src/gridWrapper/gridWrapperProps.ts +++ b/src/gridWrapper/gridWrapperProps.ts @@ -47,5 +47,5 @@ export interface GridWrapperProps theme?: GridTheme coreId?: string onRowCollapse?: (params: string) => any - // displayCollapseIcon?: boolean + displayCollapseIcon?: boolean } diff --git a/stories/components/Budget/P&L.tsx b/stories/components/Budget/P&L.tsx index 02265b0..6604c6d 100644 --- a/stories/components/Budget/P&L.tsx +++ b/stories/components/Budget/P&L.tsx @@ -535,7 +535,7 @@ export function Financial() { containerClassName={useTheme.containerClass} theme={useTheme.theme} //onColumnCollapseChange={getExpandedColumns} - // displayCollapseIcon={false} + displayCollapseIcon={false} getSelectedCoords={getSelectedCoords4} suppressNavigation defaultCoords={{ rowIndex: -1, colIndex: -1 }}