Skip to content

Commit 6565975

Browse files
committed
fix: add method as id to expansion panel for deep linking
1 parent eeab957 commit 6565975

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Methods/Methods.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ class Methods extends Component<IProps> {
6969
<Typography variant="h3" gutterBottom>Methods</Typography>
7070
{schema.methods.map((method, i) => (
7171
<ExpansionPanel
72+
id={method.name}
7273
key={i + method.name}
7374
TransitionProps={{ unmountOnExit: disableTransitionProps ? false : true }}
7475
defaultExpanded={uiSchema && (uiSchema.methods["ui:defaultExpanded"] === true || uiSchema.methods["ui:defaultExpanded"][method.name] === true)}
@@ -89,7 +90,7 @@ class Methods extends Component<IProps> {
8990
uiSchema={uiSchema}
9091
source={method.description}
9192
className={classes.description}
92-
/>
93+
/>
9394
</ExpansionPanelDetails>
9495
}
9596
{method.params && method.params.length > 0 &&

0 commit comments

Comments
 (0)