@@ -31,8 +31,8 @@ const styles = (theme: Theme) => ({
3131 fontSize : theme . typography . pxToRem ( 15 ) ,
3232 } ,
3333 root : {
34- marginBottom : theme . spacing . unit ,
35- marginTop : theme . spacing . unit * 3 ,
34+ marginBottom : theme . spacing ( 2 ) ,
35+ marginTop : theme . spacing ( 3 ) ,
3636 width : "100%" ,
3737 } ,
3838 secondaryHeading : {
@@ -52,7 +52,7 @@ interface IProps extends WithStyles<typeof styles> {
5252 methodPlugins ?: Array < React . FC < IMethodPluginProps > > ;
5353}
5454
55- class Methods extends Component < IProps > {
55+ class Methods extends Component < IProps , IState > {
5656 public render ( ) {
5757 const { schema, classes, uiSchema } = this . props ;
5858 if ( ! schema ) {
@@ -65,7 +65,11 @@ class Methods extends Component<IProps> {
6565 < div className = { classes . root } >
6666 < Typography variant = "h3" gutterBottom > Methods</ Typography >
6767 { schema . methods . map ( ( method , i ) => (
68- < ExpansionPanel key = { i + method . name } defaultExpanded = { uiSchema && uiSchema . methods [ "ui:defaultExpanded" ] } >
68+ < ExpansionPanel
69+ key = { i + method . name }
70+ TransitionProps = { { unmountOnExit : true } }
71+ defaultExpanded = { uiSchema && uiSchema . methods [ "ui:defaultExpanded" ] }
72+ >
6973 < ExpansionPanelSummary expandIcon = { < ExpandMoreIcon /> } >
7074 < Typography key = { method . name } className = { classes . heading } > { method . name } </ Typography >
7175 < Typography key = { method . summary } className = { classes . secondaryHeading } > { method . summary } </ Typography >
@@ -78,7 +82,7 @@ class Methods extends Component<IProps> {
7882 }
7983 { method . description &&
8084 < ExpansionPanelDetails key = "description" >
81- < ReactMarkdown source = { method . description } className = { classes . description } />
85+ < ReactMarkdown source = { method . description } className = { classes . description } />
8286 </ ExpansionPanelDetails >
8387 }
8488 { method . params && method . params . length > 0 &&
0 commit comments