diff --git a/src/data-workspace/category-combo-table-body-pivoted/category-combo-table-body-pivoted.js b/src/data-workspace/category-combo-table-body-pivoted/category-combo-table-body-pivoted.js index 4e8a29ecb..0acbfbdd7 100644 --- a/src/data-workspace/category-combo-table-body-pivoted/category-combo-table-body-pivoted.js +++ b/src/data-workspace/category-combo-table-body-pivoted/category-combo-table-body-pivoted.js @@ -24,13 +24,14 @@ export const PivotedCategoryComboTableBody = React.memo( categoryCombo, dataElements, greyedFields, - /* + /* filterText, globalFilterText, maxColumnsInSection, renderRowTotals, renderColumnTotals,*/ displayOptions, + collapsed, }) { const { data: metadata } = useMetadata() @@ -68,7 +69,12 @@ export const PivotedCategoryComboTableBody = React.memo( <> {rowsMatrix.map((row, id /** todo: find suitable id */) => { return ( - + {row.map((fieldInRow) => { if ( fieldInRow.type === 'columnHeader' || @@ -150,6 +156,7 @@ PivotedCategoryComboTableBody.propTypes = { categoryCombo: PropTypes.shape({ id: PropTypes.string.isRequired, }), + collapsed: PropTypes.bool, dataElements: PropTypes.arrayOf( PropTypes.shape({ id: PropTypes.string.isRequired, diff --git a/src/data-workspace/category-combo-table-body/category-combo-table-body.js b/src/data-workspace/category-combo-table-body/category-combo-table-body.js index 6fcfe999b..596c30eb6 100644 --- a/src/data-workspace/category-combo-table-body/category-combo-table-body.js +++ b/src/data-workspace/category-combo-table-body/category-combo-table-body.js @@ -1,8 +1,8 @@ -import { TableBody, TableRow, TableCell } from '@dhis2/ui' +import { TableBody, TableCell, TableRow } from '@dhis2/ui' import cx from 'classnames' import PropTypes from 'prop-types' import React, { useCallback } from 'react' -import { useMetadata, selectors } from '../../shared/index.js' +import { selectors, useMetadata } from '../../shared/index.js' import { DataEntryCell, DataEntryField } from '../data-entry-cell/index.js' import { getFieldId } from '../get-field-id.js' import { TableBodyHiddenByFiltersRow } from '../table-body-hidden-by-filter-row.js' @@ -21,6 +21,7 @@ export const CategoryComboTableBody = React.memo( maxColumnsInSection, renderRowTotals, renderColumnTotals, + collapsed, }) { const { data: metadata } = useMetadata() @@ -59,7 +60,11 @@ export const CategoryComboTableBody = React.memo( const hiddenItemsCount = filteredDeIds.size return ( - + { try { const { displayOptions: displayOptionString } = section - return JSON.parse(displayOptionString) } catch (e) { console.error( diff --git a/src/data-workspace/section-form/section.js b/src/data-workspace/section-form/section.js index 601525bb4..8a362ef57 100644 --- a/src/data-workspace/section-form/section.js +++ b/src/data-workspace/section-form/section.js @@ -114,9 +114,9 @@ export function SectionFormSection({ > {collapsible && (showSectionContent ? ( - + ) : ( - + ))}
@@ -162,23 +162,23 @@ export function SectionFormSection({ )} - {showSectionContent && - groupedDataElements.map( - ({ categoryCombo, dataElements }, i) => ( - - ) - )} + {groupedDataElements.map( + ({ categoryCombo, dataElements }, i) => ( + + ) + )} {indicators.length > 0 && showSectionContent && (