11import { Component } from 'react' ;
2- import { arrayOf , shape , number , string , func , oneOfType , object } from 'prop-types' ;
2+ import {
3+ arrayOf ,
4+ shape ,
5+ number ,
6+ string ,
7+ func ,
8+ oneOfType ,
9+ object ,
10+ } from 'prop-types' ;
311import classNames from 'classnames' ;
412import { prop } from 'ramda' ;
513import memoize from 'fast-memoize' ;
@@ -14,7 +22,7 @@ const pickClassName = prop('className');
1422/** Prop-type for a recursive data structure */
1523const tree = {
1624 value : string . isRequired ,
17- id : oneOfType [ string , number ] ,
25+ id : oneOfType [ ( string , number ) ] ,
1826} ;
1927
2028Object . assign ( tree , {
@@ -54,7 +62,7 @@ const styles = theme => ({
5462 } ,
5563 expandIcon : { } ,
5664 highlightItem : {
57- backgroundColor : 'rgb(220, 227, 239 )' ,
65+ backgroundColor : 'rgb(138, 138, 138 )' ,
5866 } ,
5967} ) ;
6068
@@ -76,7 +84,7 @@ class MuiTreeView extends Component {
7684 /** Properties applied to the ListItem element. */
7785 listItemProps : object ,
7886 /** Id of a leaf which will be highlighted by adding the class */
79- highlightId : oneOfType [ string , number ] ,
87+ highlightId : oneOfType [ ( string , number ) ] ,
8088 } ;
8189
8290 static defaultProps = {
@@ -96,7 +104,7 @@ class MuiTreeView extends Component {
96104 }
97105 ) ;
98106
99- handleLeafClick = ( leaf ) => {
107+ handleLeafClick = leaf => {
100108 if ( this . props . onLeafClick ) {
101109 this . props . onLeafClick ( leaf ) ;
102110 }
@@ -171,9 +179,7 @@ class MuiTreeView extends Component {
171179 { ...expansionPanelDetailsProps }
172180 classes = { { root : classes . panelDetails } }
173181 className = { classNames ( pickClassName ( expansionPanelDetailsProps ) ) } >
174- { node . nodes . map ( l =>
175- this . renderNode ( l , node , depth + 1 )
176- ) }
182+ { node . nodes . map ( l => this . renderNode ( l , node , depth + 1 ) ) }
177183 </ ExpansionPanelDetails >
178184 </ ExpansionPanel >
179185 ) ;
0 commit comments