@@ -93,14 +93,14 @@ class SLDSLookup extends React.Component {
9393 } ) ;
9494 }
9595
96- newItem ( ) {
96+ footerClick ( ) {
9797 this . handleClose ( ) ;
98- if ( this . props . onNewItem ) this . props . onNewItem ( ) ;
98+ if ( this . props . onFooterClick ) this . props . onFooterClick ( ) ;
9999 }
100100
101- searchRecords ( ) {
101+ headerClick ( ) {
102102 this . handleClose ( ) ;
103- if ( this . props . onSearchRecords ) this . props . onSearchRecords ( ) ;
103+ if ( this . props . onHeaderClick ) this . props . onHeaderClick ( ) ;
104104 }
105105
106106 //=================================================
@@ -159,11 +159,11 @@ class SLDSLookup extends React.Component {
159159 EventUtil . trapImmediate ( event ) ;
160160 //If the focus is on the first fixed Action Item in Menu
161161 if ( this . state . focusIndex === 0 ) {
162- this . searchRecords ( ) ;
162+ this . headerClick ( ) ;
163163 }
164164 //If the focus is on the last fixed Action Item in Menu
165165 else if ( this . state . focusIndex === ( this . state . listLength + 1 ) ) {
166- this . newItem ( ) ;
166+ this . footerClick ( ) ;
167167 }
168168 //If not, then select menu item
169169 else {
@@ -197,8 +197,10 @@ class SLDSLookup extends React.Component {
197197 getListLength = { this . getListLength . bind ( this ) }
198198 setFocus = { this . setFocus . bind ( this ) }
199199 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 ) }
202204 /> ;
203205 }
204206 }
@@ -310,16 +312,16 @@ SLDSLookup.propTypes = {
310312 filterWith : React . PropTypes . func ,
311313 onItemSelect : React . PropTypes . func ,
312314 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 ,
317319} ;
318320
319321SLDSLookup . defaultProps = {
320322 filterWith : defaultFilter ,
321323 modal : false ,
322- disabled : false
324+ disabled : false ,
323325} ;
324326
325327module . exports = SLDSLookup ;
0 commit comments