@@ -93,14 +93,14 @@ class SLDSLookup extends React.Component {
93
93
} ) ;
94
94
}
95
95
96
- newItem ( ) {
96
+ footerClick ( ) {
97
97
this . handleClose ( ) ;
98
- if ( this . props . onNewItem ) this . props . onNewItem ( ) ;
98
+ if ( this . props . onFooterClick ) this . props . onFooterClick ( ) ;
99
99
}
100
100
101
- searchRecords ( ) {
101
+ headerClick ( ) {
102
102
this . handleClose ( ) ;
103
- if ( this . props . onSearchRecords ) this . props . onSearchRecords ( ) ;
103
+ if ( this . props . onHeaderClick ) this . props . onHeaderClick ( ) ;
104
104
}
105
105
106
106
//=================================================
@@ -159,11 +159,11 @@ class SLDSLookup extends React.Component {
159
159
EventUtil . trapImmediate ( event ) ;
160
160
//If the focus is on the first fixed Action Item in Menu
161
161
if ( this . state . focusIndex === 0 ) {
162
- this . searchRecords ( ) ;
162
+ this . headerClick ( ) ;
163
163
}
164
164
//If the focus is on the last fixed Action Item in Menu
165
165
else if ( this . state . focusIndex === ( this . state . listLength + 1 ) ) {
166
- this . newItem ( ) ;
166
+ this . footerClick ( ) ;
167
167
}
168
168
//If not, then select menu item
169
169
else {
@@ -197,8 +197,10 @@ class SLDSLookup extends React.Component {
197
197
getListLength = { this . getListLength . bind ( this ) }
198
198
setFocus = { this . setFocus . bind ( this ) }
199
199
onSelect = { this . selectItem . bind ( this ) }
200
- onSearchRecords = { this . searchRecords . bind ( this ) }
201
- onNewItem = { this . newItem . bind ( this ) }
200
+ header = { this . props . header }
201
+ headerClick = { this . headerClick . bind ( this ) }
202
+ footer = { this . props . footer }
203
+ footerClick = { this . footerClick . bind ( this ) }
202
204
/> ;
203
205
}
204
206
}
@@ -310,16 +312,16 @@ SLDSLookup.propTypes = {
310
312
filterWith : React . PropTypes . func ,
311
313
onItemSelect : React . PropTypes . func ,
312
314
onChange : React . PropTypes . func ,
313
- onNewItem : React . PropTypes . func ,
314
- onSearchRecords : React . PropTypes . func ,
315
- modal : React . PropTypes [ " bool" ] ,
316
- disabled : React . PropTypes [ " bool" ] ,
315
+ onFooterClick : React . PropTypes . func ,
316
+ onHeaderClick : React . PropTypes . func ,
317
+ modal : React . PropTypes . bool ,
318
+ disabled : React . PropTypes . bool ,
317
319
} ;
318
320
319
321
SLDSLookup . defaultProps = {
320
322
filterWith : defaultFilter ,
321
323
modal : false ,
322
- disabled : false
324
+ disabled : false ,
323
325
} ;
324
326
325
327
module . exports = SLDSLookup ;
0 commit comments