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
.THIS .diet-veg{ | |
background : yellowgreen; | |
} | |
.THIS .diet-nveg{ | |
background : orangered; | |
color : white; | |
} | |
.THIS .working-true{ | |
background : rebeccapurple; | |
color : white; |
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
({ | |
/** | |
* Init function | |
* setup columns and data in this function | |
* @author Manish Choudhari | |
* */ | |
doInit : function(component, event, helper) { | |
//Let's configure the columns of the data table | |
component.set('v.columns', [ | |
//Key here is cellAttributes object for Particular column |
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 implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" > | |
<!-- attributes --> | |
<aura:attribute name="data" type="Object"/> | |
<aura:attribute name="columns" type="List"/> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<!-- A very simple data table --> | |
<lightning:datatable | |
keyField="id" | |
data="{! v.data }" |
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
({ | |
doInit : function(component, event, helper) { | |
const options=[{'Id':1,'Name':'Jaipur'}, | |
{'Id':2,'Name':'Pune'}, | |
{'Id':3,'Name':'Hyderabad'}, | |
{'Id':4,'Name':'Banglore'}, | |
{'Id':5,'Name':'Gurgaon'}, | |
{'Id':6,'Name':'Mumbai'}, | |
{'Id':7,'Name':'Chennai'}, | |
{'Id':8,'Name':'Noida'}, |
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 implements="force:appHostable,flexipage:availableForAllPageTypes" access="global" > | |
<aura:attribute name="options" type="List" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<!--invoking MultiSelect component --> | |
<c:MultiSelect mslabel="Job Location" msoptions="{!v.options}" /> | |
</aura:component> |
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
({ | |
onInit : function(component,event,helper) { | |
component.find("service").getNewRecord( | |
"Car_Experience__c", // sObject type (entityAPIName) | |
null, // recordTypeId | |
false, // skip cache? | |
$A.getCallback(function() { | |
var rec = component.get("v.carExperience"); | |
var error = component.get("v.recordError"); | |
var car=component.get("v.car"); |
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
({ | |
doInit : function(component, event, helper) { | |
helper.onInit(component, event, helper); | |
}, | |
/* | |
* This function is called when the experience is saved | |
* */ | |
onSave: function(component, event, helper) { | |
component.set("v.carExperience.Car__c", component.get("v.car.Id")); |
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 extends="c:Base"> | |
<aura:attribute type="Car__c" name="car" access="public" /> | |
<aura:attribute type="Car_Experience__c" name="carExperience" access="public" /> | |
<!-- Attribute to capture error thrown by Lighting Data Service --> | |
<aura:attribute name="recordError" type="String" access="private" /> | |
<aura:handler name="init" value="{!this}" action="{!c.doInit}" /> | |
<aura:registerEvent name="carExpAdded" type="c:CarExpAdded" /> |
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
({ | |
onCarSelected : function(component, event, helper) { | |
component.set("v.Id", event.getParam("car").Id); | |
component.set("v.showComponent", true); | |
/* | |
* handle record change; | |
* reloadRecord will cause you to lose your current record, | |
* including any changes you’ve made | |
* */ | |
component.find("service").reloadRecord(); |
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 implements="force:appHostable,flexipage:availableForAllPageTypes"> | |
<aura:attribute type="Id" name="Id" access="public" /> | |
<aura:attribute type="Car__c" name="car" access="public" /> | |
<aura:attribute name="recordError" type="String" access="private" /> | |
<!-- this attribute will hold the value of selected tab --> | |
<aura:attribute type="Id" name="tabId" access="public" /> | |
<aura:attribute type="boolean" name="showComponent" default="false" /> | |