File tree Expand file tree Collapse file tree 3 files changed +22
-25
lines changed Expand file tree Collapse file tree 3 files changed +22
-25
lines changed Original file line number Diff line number Diff line change @@ -19,15 +19,21 @@ class DefaultFooter extends React.Component {
1919 if ( nextProps . isActive !== this . props . isActive && nextProps . isActive === true ) this . props . setFocus ( this . props . id ) ;
2020 }
2121
22+ footerClick ( ) {
23+ console . log ( '=====> Lookup Footer Clicked' ) ;
24+ }
25+
2226 render ( ) {
2327 let className = 'slds-button' ;
2428 if ( this . props . isActive ) className += ' slds-theme--shade'
2529
2630 return (
27- < button id = 'newItem' tabIndex = "-1" className = { className } >
28- < Icon name = 'add' category = "utility" size = "x-small" className = "slds-icon-text-default" />
29- { 'New ' + this . props . type }
30- </ button >
31+ < div className = "slds-lookup__item" onClick = { this . footerClick } >
32+ < button id = 'newItem' tabIndex = "-1" className = { className } >
33+ < Icon name = 'add' category = "utility" size = "x-small" className = "slds-icon-text-default" />
34+ { 'New ' + this . props . type }
35+ </ button >
36+ </ div >
3137 )
3238 }
3339}
Original file line number Diff line number Diff line change @@ -19,15 +19,21 @@ class DefaultHeader extends React.Component {
1919 if ( nextProps . isActive !== this . props . isActive && nextProps . isActive === true ) this . props . setFocus ( this . props . id ) ;
2020 }
2121
22+ headerClick ( ) {
23+ console . log ( '=====> Lookup Header Clicked' ) ;
24+ }
25+
2226 render ( ) {
2327 let className = 'slds-button' ;
2428 if ( this . props . isActive ) className += ' slds-theme--shade'
2529
2630 return (
27- < button id = 'searchRecords' tabIndex = "-1" className = { className } >
28- < Icon name = 'search' category = "utility" size = "x-small" className = "slds-icon-text-default" />
29- { this . props . searchTerm ? '"' + this . props . searchTerm + '"' + ' in ' + this . props . type + 's' : ' in ' + this . props . type + 's' }
30- </ button >
31+ < div className = "slds-lookup__item" onClick = { this . headerClick } >
32+ < button id = 'searchRecords' tabIndex = "-1" className = { className } >
33+ < Icon name = 'search' category = "utility" size = "x-small" className = "slds-icon-text-default" />
34+ { this . props . searchTerm ? '"' + this . props . searchTerm + '"' + ' in ' + this . props . type + 's' : ' in ' + this . props . type + 's' }
35+ </ button >
36+ </ div >
3137 )
3238 }
3339}
Original file line number Diff line number Diff line change @@ -45,28 +45,13 @@ module.exports = React.createClass( {
4545 console . log ( item , ' Selected' ) ;
4646 } ,
4747
48- headerClick ( ) {
49- console . log ( '=====> Lookup Header Clicked' ) ;
50- } ,
51-
52- footerClick ( ) {
53- console . log ( '=====> Lookup Footer Clicked' ) ;
54- } ,
5548
5649 getHeader ( ) {
57- return (
58- < div className = "slds-lookup__item" onClick = { this . headerClick } onMouseDown = { this . headerClick } >
59- < DefaultHeader searchTerm = { this . state . searchVal } type = 'account' />
60- </ div >
61- )
50+ return < DefaultHeader searchTerm = { this . state . searchVal } type = 'account' /> ;
6251 } ,
6352
6453 getFooter ( ) {
65- return (
66- < div className = "slds-lookup__item" onClick = { this . footerClick } onMouseDown = { this . footerClick } >
67- < DefaultFooter type = 'account' />
68- </ div >
69- )
54+ return < DefaultFooter type = 'account' /> ;
7055 } ,
7156
7257 render ( ) {
You can’t perform that action at this time.
0 commit comments