Created
March 20, 2018 16:19
-
-
Save maniax89/cbb58990a6ae9041727d7b6e40aa9110 to your computer and use it in GitHub Desktop.
Salesforce Design Token
This file contains 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 | |
implements="flexipage:availableForRecordHome,force:lightningQuickActionWithoutHeader,force:hasRecordId" | |
controller="QueryController" | |
access="global" | |
> | |
<ltng:require | |
scripts="{!join(',', | |
$Resource.babelHelpers, | |
$Resource.actions, | |
$Resource.reducers)}" | |
afterScriptsLoaded="{!c.initMyComponent}" | |
/> | |
<aura:attribute name="search" type="Object" /> | |
<aura:attribute name="loaded" type="Boolean" default="false" /> | |
<aura:attribute | |
name="pageSize" | |
type="Integer" | |
default="{!v.search.pageSize}" | |
/> | |
<c:Redux aura:id="store" /> | |
<aura:if isTrue="{!v.loaded}"> | |
<div> | |
<div> | |
<MyNamespace:SearchInput | |
search="{!v.search}" | |
/> | |
</div> | |
<MyNamespace:TabNavigation | |
search="{!v.search}" | |
/> | |
</div> | |
</aura:if> | |
</aura:component> |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<AuraDefinitionBundle xmlns="urn:metadata.tooling.soap.sforce.com" fqn="MyComponent"> | |
<apiVersion>41.0</apiVersion> | |
<description>A Lightning Component Bundle</description> | |
</AuraDefinitionBundle> |
This file contains 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
<design:component> | |
<design:attribute | |
name="pageSize" | |
label="{!$Label.c.MyPagesizeLabel}" | |
min="1" | |
max="100" | |
default="{!v.search.pageSize}" | |
description="{!$Label.c.MyPagesizeDescription}" | |
/> | |
</design:component> |
This file contains 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
({ | |
initMyComponent: function(component, event, helper) { | |
helper.initMyComponent(component, helper); | |
} | |
}) |
This file contains 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
({ | |
initMyComponent: function (component, helper) { | |
var store = component.find('store'); | |
reducers.initializeReducers(store); | |
component.dispatch({ | |
type: 'REQUEST_RESULTS' | |
}); | |
if (component.get('v.pageSize')) { | |
component.dispatch({ | |
type: 'UPDATE_PAGE_SIZE_SUCCESS', | |
pageSize: component.get('v.pageSize') | |
}); | |
} | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment