@@ -95,16 +95,16 @@ class FilterExample extends React.Component {
9595 expanded : [
9696 '/app' ,
9797 ] ,
98- filterText : "" ,
99- nodes : nodes ,
100- nodesFiltered : nodes
98+ filterText : "" ,
99+ nodes : nodes ,
100+ nodesFiltered : nodes
101101 } ;
102102
103103 this . onCheck = this . onCheck . bind ( this ) ;
104104 this . onExpand = this . onExpand . bind ( this ) ;
105- this . setFilterText = this . setFilterText . bind ( this ) ;
106- this . filterTree = this . filterTree . bind ( this ) ;
107- this . nodeFilter = this . nodeFilter . bind ( this ) ;
105+ this . setFilterText = this . setFilterText . bind ( this ) ;
106+ this . filterTree = this . filterTree . bind ( this ) ;
107+ this . nodeFilter = this . nodeFilter . bind ( this ) ;
108108 }
109109
110110 onCheck ( checked ) {
@@ -114,8 +114,8 @@ class FilterExample extends React.Component {
114114 onExpand ( expanded ) {
115115 this . setState ( { expanded } ) ;
116116 }
117-
118- nodeFilter ( node : Node ) {
117+
118+ nodeFilter ( node : Node ) {
119119 const children = ( node . children || [ ] ) . map ( this . nodeFilter ) . filter ( c => c !== null ) ;
120120
121121 return node . label . indexOf ( this . state . filterText ) !== - 1 || children . length ? { ...node , children : children } : null ;
@@ -134,25 +134,25 @@ class FilterExample extends React.Component {
134134 nodesFiltered : nodesFiltered
135135 } ) ;
136136 }
137-
138- setFilterText ( e ) {
139- this . setState ( { filterText : e . target . value } , this . filterTree ) ;
140- }
137+
138+ setFilterText ( e ) {
139+ this . setState ( { filterText : e . target . value } , this . filterTree ) ;
140+ }
141141
142142 render ( ) {
143143 const { checked, expanded } = this . state ;
144144
145145 return (
146- < div >
147- < input type = "text" placeholder = "Search" value = { this . state . filterText } onChange = { this . setFilterText } />
148- < CheckboxTree
149- checked = { checked }
150- expanded = { expanded }
151- nodes = { this . state . nodesFiltered }
152- onCheck = { this . onCheck }
153- onExpand = { this . onExpand }
154- />
155- </ div >
146+ < div >
147+ < input type = "text" placeholder = "Search" value = { this . state . filterText } onChange = { this . setFilterText } />
148+ < CheckboxTree
149+ checked = { checked }
150+ expanded = { expanded }
151+ nodes = { this . state . nodesFiltered }
152+ onCheck = { this . onCheck }
153+ onExpand = { this . onExpand }
154+ />
155+ </ div >
156156 ) ;
157157 }
158158}
0 commit comments