@@ -154,11 +154,9 @@ class SLDSLookup extends React.Component {
154154 else if ( ( event . keyCode === KEYS . ENTER || event . keyCode === KEYS . SPACE ) && this . state . focusIndex !== null ) {
155155 EventUtil . trapImmediate ( event ) ;
156156 //If the focus is on the first fixed Action Item in Menu, click it
157- if ( this . props . header && this . state . focusIndex === 0 ) {
157+ if ( this . refs . header && this . state . focusIndex === 0 ) {
158158// document.getElementById('menuContainer').firstChild.children[0].click();
159- if ( this . refs . header ) {
160- React . findDOMNode ( this . refs . header ) . click ( ) ;
161- }
159+ React . findDOMNode ( this . refs . header ) . click ( ) ;
162160 }
163161 //If the focus is on the last fixed Action Item in Menu, click it
164162 else if ( this . props . footer && this . state . focusIndex === ( this . state . listLength + 1 ) ) {
@@ -182,7 +180,7 @@ class SLDSLookup extends React.Component {
182180 }
183181
184182 getHeader ( ) {
185- if ( this . props . header ) {
183+ if ( this . props . headerRenderer ) {
186184 let headerActive = false ;
187185 let isActiveClass = null ;
188186 if ( this . state . focusIndex === 0 ) {
@@ -192,7 +190,7 @@ class SLDSLookup extends React.Component {
192190 headerActive = false ;
193191 isActiveClass = '' ;
194192 }
195- const Header = this . props . header ;
193+ const Header = this . props . headerRenderer ;
196194 return < div className = { isActiveClass } >
197195 < Header ref = 'header' { ... this . props }
198196 searchTerm = { this . state . searchTerm }
@@ -220,7 +218,6 @@ class SLDSLookup extends React.Component {
220218 setFocus = { this . setFocus . bind ( this ) }
221219 onSelect = { this . selectItem . bind ( this ) }
222220 header = { this . getHeader ( ) }
223- headerProps = { this . props . headerProps }
224221 footer = { this . props . footer }
225222 /> ;
226223 }
0 commit comments