Skip to content

Commit 4c459bd

Browse files
LukasBollsdirix
authored andcommitted
propagate readOnly prop of ExpandPanel
closes eclipsesource#1969 Signed-off-by: Lukas Boll lukas-bool@web.de
1 parent 79e1c56 commit 4c459bd

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

packages/material/src/layouts/ExpandPanelRenderer.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ import ArrowDownward from '@mui/icons-material/ArrowDownward';
3838
const iconStyle: any = { float: 'right' };
3939

4040
interface OwnPropsOfExpandPanel {
41+
enabled: boolean;
4142
index: number;
4243
path: string;
4344
uischema: ControlElement;
@@ -84,6 +85,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
8485
}, [labelHtmlId]);
8586

8687
const {
88+
enabled,
8789
childLabel,
8890
childPath,
8991
index,
@@ -191,6 +193,7 @@ const ExpandPanelRendererComponent = (props: ExpandPanelProps) => {
191193
</AccordionSummary>
192194
<AccordionDetails>
193195
<JsonFormsDispatch
196+
enabled={enabled}
194197
schema={schema}
195198
uischema={foundUISchema}
196199
path={childPath}

packages/material/src/layouts/MaterialArrayLayout.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ const MaterialArrayLayoutComponent = (props: ArrayLayoutProps)=> {
4545
expanded === composePaths(props.path, `${index}`);
4646

4747
const {
48+
enabled,
4849
data,
4950
path,
5051
schema,
@@ -83,6 +84,7 @@ const MaterialArrayLayoutComponent = (props: ArrayLayoutProps)=> {
8384
map(range(data), index => {
8485
return (
8586
<ExpandPanelRenderer
87+
enabled={enabled}
8688
index={index}
8789
expanded={isExpanded(index)}
8890
schema={schema}

0 commit comments

Comments
 (0)