diff --git a/.yarn/install-state.gz b/.yarn/install-state.gz index 480d2a0b2..66598afbf 100644 Binary files a/.yarn/install-state.gz and b/.yarn/install-state.gz differ diff --git a/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.js b/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.js index 19d2c2591..4362455e2 100644 --- a/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.js +++ b/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.js @@ -13,6 +13,7 @@ const Section = ({ onFieldChange, onFieldErrorsChange, renderField, + ...otherProps }) => { const onColumnFieldChange = (fieldId, value, error) => { onFieldChange(fieldId, value); @@ -22,6 +23,7 @@ const Section = ({ return
{details.label &&

{details.label}

} diff --git a/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.test.js b/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.test.js index c3c314252..266cc786e 100644 --- a/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.test.js +++ b/src/ReportManager/DetailsSection/SchemaForm/fields/Section/index.test.js @@ -33,6 +33,12 @@ describe('ReportManager - DetailsSection - SchemaForm - fields - Section', () => {...props} />); + test('configures the section with other props', async () => { + renderSectionField({ hidden: true }); + + expect(screen.getByTestId('schema-form-section-section-1')).toHaveAttribute('hidden'); + }); + test('does not show a header if the label is not defined', async () => { details.label = ''; renderSectionField(); diff --git a/src/ReportManager/DetailsSection/SchemaForm/index.js b/src/ReportManager/DetailsSection/SchemaForm/index.js index 7709c7a75..a52a82701 100644 --- a/src/ReportManager/DetailsSection/SchemaForm/index.js +++ b/src/ReportManager/DetailsSection/SchemaForm/index.js @@ -191,11 +191,12 @@ const SchemaForm = ({ }, [formData, formElements, setLocationMarkers]); return
- {visibleSectionIds.map((sectionId) =>