diff --git a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx index d59c738911e..3037e9b6bc3 100644 --- a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx +++ b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/OverrideFields/Summary2OverrideDisplayType.tsx @@ -34,7 +34,7 @@ export const Summary2OverrideDisplayType = ({ handleCustomTypeChange(e.target.value as OverrideDisplayType)} > {customConfigTypes.map((type: CustomConfigType) => ( diff --git a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2Override.test.tsx b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2Override.test.tsx index 8714bd493df..29eb93ad685 100644 --- a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2Override.test.tsx +++ b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2Override.test.tsx @@ -26,6 +26,7 @@ import type { const checkBoxId = componentWithOptionsMock.id; const multipleSelectId = componentWithMultipleSelectMock.id; const subformComponentId = subformComponentMock.id; +const repeatingGroupComponentId = container2IdMock; const layoutMockWithMultipleSelect = { ...layoutMock, components: { @@ -191,25 +192,29 @@ describe('Summary2Override', () => { it('should render component specific overrides', async () => { const user = userEvent.setup(); - render({ overrides: [{ componentId: container2IdMock }] }); + render({ overrides: [{ componentId: repeatingGroupComponentId }] }); await user.click(overrideCollapsedButton(1)); await user.selectOptions(overrideDisplaySelector(), overrideDisplaySelectType('table')); expect(defaultProps.onChange).toHaveBeenCalledWith( - expect.arrayContaining([{ componentId: container2IdMock, display: 'table' }]), + expect.arrayContaining([{ componentId: repeatingGroupComponentId, display: 'table' }]), ); }); it.each([ { - componentId: container2IdMock, - defaultProps: { componentId: container2IdMock, display: 'full' }, + componentId: repeatingGroupComponentId, + defaultProps: { componentId: repeatingGroupComponentId, display: 'full' }, }, { componentId: subformComponentId, defaultProps: { componentId: subformComponentId, display: 'table' }, }, + { + componentId: multipleSelectId, + defaultProps: { componentId: multipleSelectId, displayType: 'list' }, + }, ])('should set default props for components', async (args) => { const user = userEvent.setup(); render({ overrides: [{ componentId: component1IdMock }] }); diff --git a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2OverrideEntry.tsx b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2OverrideEntry.tsx index 94c6a96e925..76a0925d20d 100644 --- a/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2OverrideEntry.tsx +++ b/frontend/packages/ux-editor/src/components/config/componentSpecificContent/Summary2/Override/Summary2OverrideEntry.tsx @@ -66,6 +66,9 @@ export const Summary2OverrideEntry = ({ return { display: 'full' }; case ComponentType.Subform: return { display: 'table' }; + case ComponentType.Checkboxes: + case ComponentType.MultipleSelect: + return { displayType: 'list' }; default: return {}; }