@@ -154,11 +154,9 @@ class SLDSLookup extends React.Component {
154
154
else if ( ( event . keyCode === KEYS . ENTER || event . keyCode === KEYS . SPACE ) && this . state . focusIndex !== null ) {
155
155
EventUtil . trapImmediate ( event ) ;
156
156
//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 ) {
158
158
// 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 ( ) ;
162
160
}
163
161
//If the focus is on the last fixed Action Item in Menu, click it
164
162
else if ( this . props . footer && this . state . focusIndex === ( this . state . listLength + 1 ) ) {
@@ -182,7 +180,7 @@ class SLDSLookup extends React.Component {
182
180
}
183
181
184
182
getHeader ( ) {
185
- if ( this . props . header ) {
183
+ if ( this . props . headerRenderer ) {
186
184
let headerActive = false ;
187
185
let isActiveClass = null ;
188
186
if ( this . state . focusIndex === 0 ) {
@@ -192,7 +190,7 @@ class SLDSLookup extends React.Component {
192
190
headerActive = false ;
193
191
isActiveClass = '' ;
194
192
}
195
- const Header = this . props . header ;
193
+ const Header = this . props . headerRenderer ;
196
194
return < div className = { isActiveClass } >
197
195
< Header ref = 'header' { ... this . props }
198
196
searchTerm = { this . state . searchTerm }
@@ -220,7 +218,6 @@ class SLDSLookup extends React.Component {
220
218
setFocus = { this . setFocus . bind ( this ) }
221
219
onSelect = { this . selectItem . bind ( this ) }
222
220
header = { this . getHeader ( ) }
223
- headerProps = { this . props . headerProps }
224
221
footer = { this . props . footer }
225
222
/> ;
226
223
}
0 commit comments