This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
isFunction: function(obj) { | |
return !!(obj && obj.constructor && obj.call && obj.apply); | |
}, | |
echo: function(cmp, message, callback) { | |
var action = cmp.get('{!c.echo}'); | |
action.setParams({ | |
message: message | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class echoController { | |
@AuraEnabled | |
public static String echo(String message) { | |
return message; | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<aura:component > | |
<aura:attribute name="echo" type="String" required="true" /> | |
<li class="slds-lookup__item"> | |
<div class="{!'slds-page-header' + if(v.echo.listener == 2 , ' slds-theme--info', ' slds-theme--alt-inverse')}"> | |
{!v.echo.text} : {!v.echo.state} | |
</div> | |
</li> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
- Created by Sonal_Chaudhary on 7/13/2017. | |
--> | |
<aura:component description="BrokerWrapper" controller="BrokerController"> | |
<aura:attribute name="brokers" type="Broker__c[]"/> | |
<aura:attribute name="total" type="Integer"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
- Created by Sonal_Chaudhary on 7/13/2017. | |
--> | |
<aura:component description="BrokerChild"> | |
<aura:attribute name="broker" type="Broker__c"/> | |
<aura:attribute name="url" type="String"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}"/> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created by Sonal_Chaudhary on 7/13/2017. | |
*/ | |
public with sharing class BrokerController { | |
public class BrokerDetails { | |
@AuraEnabled | |
public Integer total { get;set; } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
const Header = () => { | |
return <div>This is a header</div>; | |
} | |
export default Header; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
class Header extends Component { | |
render() { | |
return ( | |
<div> | |
<p>This is a new header</p> | |
</div> | |
) | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
class Header extends Component { | |
onChangeHandler = (event) => { | |
console.log(event.target.value); | |
} | |
render() { | |
return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from 'react'; | |
class Header extends Component { | |
state = { | |
keyword: '' | |
} | |
onChangeHandler = (event) => { | |
this.setState({ |