I Have written following code  Component --   &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;  &lt;aura:attribute name="country" type="Lead"/&gt; &lt;ui:inputSelect label="Country" class="dynamic" aura:id="InputSelectDynamic" value="{!v.leadObj.Country__c}" change="{!c.onSelectChange}"/&gt;  &lt;aura:if isTrue="{!v.InputSelectDynamic != '--None--'}" &gt;     &lt;ui:inputSelect label="States" class="dynamic" aura:id="states" value="{!v.leadObj.States__c}" /&gt;  &lt;/aura:if&gt;   Java Script Controller -   ({     doInit : function(component, event, helper) {         var action = component.get("c.getLeadCountry");         var inputsel = component.find("InputSelectDynamic");         var opts=[];         action.setCallback(this, function(a) {             for(var i=0;i&lt; a.getReturnValue().length;i++){                 opts.push({"class": "optionClass", label: a.getReturnValue()[i], value: a.getReturnValue()[i]});             }             inputsel.set("v.options", opts);          });         $A.enqueueAction(action);     },     onSelectChange : function(component,event,helper){         var action = component.get("c.getLeadState")         var inputsel = component.find("states");         var opts=[];         action.setCallback(this, function(a) {             for(var i=0;i&lt; a.getReturnValue().length;i++){                 opts.push({"class": "optionClass", label: a.getReturnValue()[i], value: a.getReturnValue()[i]});             }             inputsel.set("v.options", opts);          });         $A.enqueueAction(action);     } })   Apex Controller -   public class DependentPicklistDemoController {     @AuraEnabled     public static List&lt;String&gt; getLeadCountry(){         List&lt;String&gt; options = new List&lt;String&gt;();         options.add('--None--');         Schema.DescribeFieldResult fieldResult = lead.Country__c.getDescribe();         List&lt;Schema.PicklistEntry&gt; ple = fieldResult.getPicklistValues();         for (Schema.PicklistEntry f: ple) {             options.add(f.getLabel());         }         return options;     }     @AuraEnabled     public static List&lt;String&gt; getLeadState(){         List&lt;String&gt; options = new List&lt;String&gt;();         Schema.DescribeFieldResult fieldResult = lead.States__c.getDescribe();         List&lt;Schema.PicklistEntry&gt; ple = fieldResult.getPicklistValues();         for (Schema.PicklistEntry f: ple) {             options.add(f.getLabel());         }         return options;     } }   I am not able to filter child picklist value on the basis of parent picklist values. Please help--
74440
It's possible to define dependent picklist in the setup and the are supported out-of-the-box in Visualforce.  Are they also supported in Lightning natively? Is it on the roadmap to support them soon? If not: is there a best practice or a easily reusable workaround available right now?
87646
Salesforce has functions that do a lot of basic web app functionality for you, called Event Reference. They can be found here   On the editRecord Event Reference, found here   essentaily, I create a   &lt;ui:button label="Edit" press="{!c.editRecord}"/&gt;   on my component, reference the attribute on the page and add the function from the docs in the controller  editRecord : function(component, event, helper) {     var editRecordEvent = $A.get("e.force:editRecord");      console.log("record id is: " + component.get("v.item.Id"));     console.log("editRecordEvent value is: " + editRecordEvent);      editRecordEvent.setParams({         "recordId": component.get("v.item.Id")     });      editRecordEvent.fire(); }   correct?  Here is the odd thing. From the console.logs, I get the record id, but the editRecordEvent returns undefined. What is going on? Is there something I need to reference in my component to use Event Reference?
21402
I am populate a pick list value from design resource.But it is not loading value in the picklist. component:  &lt;aura:attribute name="Recordtype" type="String" access="global"/&gt; &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt; &lt;ui:Inputselect aura:id="Recordty" value="{!v.Recordt}"/&gt;&lt;br/&gt;   Controller js:  doInit : function(component, event, helper) {     var opts = [];             var inputsel = component.find("Recordty");             var recur = component.get("v.Recordtype");             for(var i=0;i&lt;recur.length;i++){             opts.push({"class": "optionClass", label: recur[i], value:recur[i]});         }         inputsel.set("v.Recordt", opts);     }    Design resource:  &lt;design:component&gt; &lt;design:attribute name="Recordtype" datasource="Account,Contact,Lead,Opportunity"/&gt;  &lt;/design:component&gt;
122134
I am dynamically creating a toast as shown below. This toast is created when response is received from server. I have created a component for toast and am dynamically creating it using $A.createComponent. The toast is getting fired when I am testing it in SF1 simulator or when I  have added my component in app builder. However, it is not getting thrown on screen, thought it is generated as seen in console.log, in case when I test it using standalone app (adding parent component to .app file and then preview) OR when i render my component using ltng:out in a VF page. What may be the reason for this?     controller from where dynamically toast is created:   . . . if (component.isValid() &amp;&amp; state === "SUCCESS") {             console.log("Values updated successfully!");             //$A.get('e.force:refreshView').fire(); //this is also not working             this.createToastComponent(component, 'success', 'Success!', 'Record Saved successfully!');      createToastComponent : function(component, type, title, message){      $A.createComponent(         "c:ToastComponent",         {             "type" : type,             "title" : title,             "message": message         },         function(newToast, status, errorMessage){             if(errorMessage === null){                 //do nothing             }             else{                 console.log('Toast errorMessage: '+ errorMessage);             }         }     ); },      toastComponent UPDATED:   &lt;aura:component &gt; &lt;aura:attribute name="type" type="String" /&gt; &lt;aura:attribute name="title" type="String" /&gt; &lt;aura:attribute name="message" type="String" /&gt; &lt;!--&lt;aura:handler name="init" action="{!c.handleInit}" value="{!this}" /&gt;--&gt;  &lt;div class="slds"&gt;     &lt;div class="slds-notify_container"&gt;         &lt;div aura:id="successToast" class="slds-notify slds-notify--toast slds-theme--success" role="alert"&gt;             &lt;span class="slds-assistive-text"&gt;Success&lt;/span&gt;             &lt;button class="slds-button slds-notify__close slds-button--icon-inverse" title="Close"&gt;                 &lt;c:SVGIcon svgPath="/resource/SLDS214/assets/icons/action-sprite/svg/symbols.svg#close"                            class="slds-button__icon slds-button__icon--large" assistiveText="Close"/&gt;                 &lt;span class="slds-assistive-text"&gt;Close&lt;/span&gt;             &lt;/button&gt;             &lt;div class="slds-notify__content slds-grid"&gt;                 &lt;div class="slds-col slds-align-middle"&gt;                     &lt;h2 class="slds-text-heading--small "&gt;{!v.message}&lt;/h2&gt;                 &lt;/div&gt;             &lt;/div&gt;         &lt;/div&gt;     &lt;/div&gt; &lt;/div&gt;        toast component controller:   ({ handleInit : function(component, event, helper) {      var toastEvent = $A.get("e.force:showToast");     console.log('toastEvent: '+ toastEvent+ 'title: '+ component.get("v.title")+ 'message: '+ component.get("v.message"));     toastEvent.setParams({         "title": component.get("v.title"),         "message":  component.get("v.message"),         "type": component.get("v.type")     });     toastEvent.fire(); }   })     Output in console.log:   toastEvent: SecureAuraEvent: [object Object]{ key: {"namespace":"c"} }title: SUCCESS!message: Record created Successfully
21774
Is there a way we can get the value from force:RecordData on init ? I am getting the onclick event of a button.  &lt;aura:handler name="init" value="{!this}" action="{!c.doInit}"/&gt;     &lt;aura:attribute name="recordId" type="String"/&gt;      &lt;aura:attribute name="showButton" type="Boolean" default="false"/&gt;     &lt;aura:attribute name="Opportunity" type="Object"/&gt;        &lt;aura:attribute name="parentOpp" type="Object"/&gt;     &lt;aura:attribute name="oppLoadError" type="String"/&gt;     &lt;force:recordData aura:id="oppRecordLoader"                       recordId="{!v.recordId}"                       fields="Id,                               Name,                               AccountId,                               Cohort_Sem__r.End_date__c,                               LeadSource,                               Staff_Referral_Detail__c,                               lead_source_detail__c"                       targetRecord="{!v.Opportunity}"                       targetFields="{!v.parentOpp}"                       targetError="{!v.oppLoadError}"                       /&gt;   JS:  doInit: function(component, event, helper) {                     var opp = component.get("v.parentOpp");                   console.log('Name Value: '+ opp.Name);     }   Error:     Action failed: c:createIWSRecord$controller$doInit [Cannot read   property 'Name' of null] quickActionHandlerHelper.js failed to create   component - forceChatter:lightningComponent
37922
I'm trying to implement the sorting functionality on a lightning:datatable. Sorting works one way (descending, clicking the column header again and nothing happens). I have followed the documentation and here's my code below:  &lt;aura:attribute name="selectedAccountId" type="Id" access="public" /&gt; &lt;aura:attribute name="accounts" type="Object"/&gt; &lt;aura:attribute name="mycolumns" type="List"/&gt; &lt;aura:handler name="init" value="{! this }" action="{! c.doInit }"/&gt;  &lt;aura:registerEvent name="AccountFilterChange" type="c:AccountFilterChange" /&gt;   &lt;lightning:datatable aura:id="lightningTable"                      data="{! v.accounts }"                      columns="{! v.mycolumns }"                      keyField="Id"                      onrowaction="{! c.handleRowAction }"                      onsort="{!c.updateColumnSorting}"                      hideCheckboxColumn="true" /&gt;   Controller:  doInit: function(component, event, helper) {    helper.callServer(component, "c.getAccounts", function(response) {        component.set("v.accounts", response);        })     component.set('v.mycolumns', [         {type: "button", typeAttributes: {             label: '',             iconName: 'utility:add',             name: 'selectRecord',             title: 'selectRecord',             disabled: false,             value: 'edit',             variant: {fieldName: 'variantValue'},         }},         {label: 'Name', fieldName: 'Name', type: 'text', sortable: true},             ]);         },  handleRowAction: function(component, event, helper) {     var account = event.getParam("row")     var action = event.getParam("action");     if (action.name == "selectRecord") {         var event = component.getEvent("AccountFilterChange");          event.setParams({             accountId: account.Id,         });     }  event.fire();  helper.addRow(component, account); },  updateColumnSorting: function(component, event, helper) {     var fieldName = event.getParam('fieldName');     var sortDirection = event.getParam('sortDirection');     // assign the latest attribute with the sorted column fieldName and sorted direction     component.set("v.sortedBy", fieldName);     component.set("v.sortedDirection", sortDirection);     helper.sortData(component, fieldName, sortDirection);     }   Helper:  sortData: function (component, fieldName, sortDirection) {      var data = component.get("v.accounts");      var reverse = sortDirection !== 'asc';      //sorts the rows based on the column header that's clicked      data.sort(this.sortBy(fieldName, reverse))      component.set("v.accounts", data);      },  sortBy: function (field, reverse, primer) {      var key = primer ? function(x) {return primer(x[field])} : function(x) {return x[field]};      //checks if the two rows should switch places      reverse = !reverse ? 1 : -1;      return function (a, b) {          return a = key(a), b = key(b), reverse * ((a &gt; b) - (b &gt; a));      }  }   How would I make this work so both desc/asc will work when clicking the column header?
63671
Below is my code to create the component dynamically - The component is "ui:inputselect"  $A.createComponent(             RecoveryLineItem.Attributes[i].name,{                 "class" : "slds-input ",                 "aura:id" : 'ExampleId',                 "label" : RecoveryLineItem.Attributes[i].label,                 "multiple" : RecoveryLineItem.Attributes[i].multiple             }, ....   ..  console.log(component.find('ExampleId').get("v.value"))    Or console.log(component.find('ExampleId'))  is Giving as 'Undefined"  How to access the aura:id of the dynamically created components?
25453
I have created a 'control' using jQuery and used jQuery.extend to assist in making it as OO as possible.  During the initialisation of my control I wire up various click events like so  jQuery('#available input',              this.controlDiv).bind('click', this, this.availableCategoryClick);   Notice that I am pasing 'this' as the data argument in the bind method. I do this so that I can get at data attached to the control instance rather from the element that fires the click event.   This works perfectly, however i suspect there is a better way  Having used Prototype in the past, I remember a bind syntax that allowed you to control what the value of 'this' was in the event.  What is the jQuery way?
15466
&lt;apex:page standardController="Employee__c" extensions="testPage" id="p"&gt; &lt;apex:form id="f"&gt;        &lt;div&gt;         &lt;input type="radio" name="acc" value="Existing" checked="checked"                 onclick="show(true, false);"&gt;Existing&lt;/input&gt;         &lt;input type="radio" name="acc" value="NEWAcc"                 onclick="show(false, true);"&gt;New&lt;/input&gt;     &lt;/div&gt;     &lt;apex:pageBlock id="pb1" title="Pg Block 1"&gt;     &lt;apex:pageBlockButtons &gt;  &lt;apex:commandButton value="save" action="{!saving}"/&gt;    &lt;/apex:pageBlockButtons&gt;     &lt;apex:pageBlockSection columns="1"&gt;    &lt;apex:inputField value="{!pme.Name}" /&gt;    &lt;apex:inputField value="{!pme.Address__c}"/&gt;       &lt;apex:inputField value="{!pme.Phone__c}"/&gt; &lt;apex:inputField value="{!pme.type__c}"/&gt;     &lt;/apex:pageBlockSection&gt;     &lt;/apex:pageBlock&gt;     &lt;apex:pageBlock id="pb2" title="Pg Block 2"&gt;     &lt;apex:pageBlockButtons &gt;  &lt;apex:commandButton value="save" action="{!saving}"/&gt;   &lt;/apex:pageBlockButtons&gt;     &lt;apex:pageBlockSection columns="1"&gt;    &lt;apex:inputField value="{!pme.Name}" /&gt; &lt;apex:inputField value="{!pme.Job_Title__c}"/&gt;    &lt;apex:inputField value="{!pme.Salary__c}"/&gt;    &lt;apex:inputField value="{!pme.type__c}"/&gt;     &lt;/apex:pageBlockSection&gt;     &lt;/apex:pageBlock&gt; &lt;/apex:form&gt;    &lt;script&gt; function show(showPb1, showPb2) {     // Match Visualforce's prefixing pattern     document.getElementById('p:f:pb1').style.display = showPb1 ? 'block' : 'none';     document.getElementById('p:f:pb2').style.display = showPb2 ? 'block' : 'none'; } show(true, false); &lt;/script&gt; &lt;/apex:page&gt;   Controller  public with sharing class testPage { public string Existing{get; set;} public string NEWAcc{get; set;} public Boolean radioexisting{get; set;} public Boolean radionew{get; set;} public Employee__c pmepme{get;set;} List&lt;SelectOption&gt; ownershipValues;     public Employee__c emp{get;set;}     public Employee__c pme{get;set;}     public Employee__c emplist{get;set;}     public String var {get;set;}         public boolean editSection {get;set;}          public testPage(ApexPages.StandardController controller) {         radioexisting=true;         radionew=false;             Employee__c emp=new Employee__c();             pme=(Employee__c )controller.getRecord();             editSection =true;             var= ApexPages.currentPage().getParameters().get('Id');              system.debug('erecrrrtrtrt');                  system.debug('erecrrrtrtrt'+NEWAcc);             if(var!=null){             emplist=[select Name,Address__c,Phone__c,Job_Title__c,Salary__c,type__c  From Employee__c where id=:var];             }             }          public PageReference saving(){                         system.debug('erecrrrtrtrt'+Existing);                  system.debug('erecrrrtrtrt'+NEWAcc);             upsert pme;             PageReference p=new PageReference ('/'+pme.id);             p.setRedirect(true);             return p;             }     public PageReference pbBlockRender() {     return null;     }     public PageReference EdittheSection (){ editSection = true; PageReference pf=new PageReference('https://c.ap2.visual.force.com/apex/test6');  pf.setredirect(true); return pf;           }      public String mypbBlock { get; set; } }   iam getting the following please help to fix it     System.SObjectException: SObject row was retrieved via SOQL without   querying the requested field: Employee__c.Name
43884
With events being fired and also handled in a helper, I have multiple copies of simple constants and so there is some risk of silent failure due to typos.  Given the helper functions are defined as properties of an object, it appears possible to define constants in the same way and reference them via the helper instance:  ({     ADD_ACTION : 'ADD',     EDIT_ACTION : 'EDIT',      onRowAction : function(component, event, helper) {         var action = event.getParam('action');         switch(action.name) {             case this.ADD_ACTION:                 ...             case this.EDIT_ACTION:                 ...         }     }, })   But is there a better way to share constants between helper methods in a single Lightning Component?  PS  itzmukeshy7's use of objects to group the constants is a nice refinement:  ({     actions: {         ADD: 'ADD',         EDIT: 'EDIT'     },      onRowAction : function(component, event, helper) {         var action = event.getParam('action');         switch(action.name) {             case this.actions.ADD:                 ...             case this.actions.EDIT:                 ...         }     }, })
70805
I receive a problem in the targetConfig, when I enter the actionType it gives me an error that says it is an invalid element name. Do you know why that happens?
104040
&lt;div aria-hidden="false" aura:id="newClientSectionId" role="dialog" class="slds-modal slds-modal--large slds-fade-in-open slds-hide"       style="width: 60%; margin: auto; "&gt;     &lt;div class="slds-m-bottom--xx-large"&gt;&lt;/div&gt;     &lt;div class="slds-modal__container"&gt;         &lt;div class="slds-modal__header"&gt;             &lt;button class="slds-button slds-button--icon-inverse slds-modal__close" onclick="{!c.showModalBox}"&gt;                 &lt;span class="slds-assistive-text"&gt;Close&lt;/span&gt;             &lt;/button&gt;             &lt;h2 class="slds-text-heading--medium"&gt;Create Opportunity&lt;/h2&gt;         &lt;/div&gt;         &lt;div class="slds-modal__content slds-p-around--medium"&gt;             &lt;div class="slds-m-top--xx-large"&gt;&lt;/div&gt;         &lt;/div&gt;         &lt;div class="slds-modal__footer"&gt; &lt;button class="slds-button slds-button--neutral" onclick="{!c.showModalBox}"&gt;Cancel&lt;/button&gt;             &lt;ui:button class="slds-button slds-button--brand" press="{!c.saveOpportunity}" label="Save" /&gt;         &lt;/div&gt;     &lt;/div&gt; &lt;/div&gt;  &lt;div class="slds-backdrop slds-backdrop--open slds-hide" id="backGroundSectionId"&gt;&lt;/div&gt;   Controller  //for showing modal $A.util.removeClass(component.find("newClientSectionId"), "slds-hide"); $A.util.removeClass(component.find("backGroundSectionId"), "slds-hide");   CSS  .THIS.slds-hide {    display:none; }
121438
I am using jQuery library in my visual force page, but I've faced a major problem when I tried to use tabs "apex:tabPanel".  &lt;script src="{!$Resource.jQuery}"&gt;&lt;/script&gt; &lt;!-- If I delete this script the tabs work !! --&gt;  &lt;apex:tabPanel tabClass="activeTab" inactiveTabClass="inactiveTab"&gt;   &lt;apex:tab label="Tab#1" id="tab1"&gt;&lt;/apex:tab&gt;   &lt;apex:tab label="Tab#2" id="tab2"&gt;&lt;/apex:tab&gt; &lt;/apex:tabPanel&gt;   I get a "JS" errors in the console when I try to click on any tab, but if I delete jQuery library it works. So I guess there is a conflict between jQuery and apex:tabPanel functionality.    Here's what I got in the console   Uncaught ReferenceError: initViewstateTab is not defined  Uncaught TypeError: Object [object Object] has no method 'dispatchEvent'  Uncaught ReferenceError: initViewstateTab is not defined  event.returnValue is deprecated. Please use the standard event.preventDefault() instead. Uncaught TypeError: Object [object Object] has no method 'hasClassName'  Uncaught TypeError: Cannot call method 'replace' of undefined
84007
i'm trying to set a list of string to an aura:attribute and i get this error:     Uncaught rerender threw an error in 'markup://aura:expression'   [info.$component$.$isValid$ is not a function]   that's the attribute:  &lt;aura:attribute name="parents" type="String[]"/&gt;   i call this function in js:  test: function(component){     var action = component.get("c.test");         //Set up the callback         var self = this;         action.setCallback(this, function(actionResult) {                   debugger;             component.set("v.parents", actionResult.getReturnValue());         });                 $A.enqueueAction(action);    }   and thats the function:  @AuraEnabled public static List&lt;String&gt; test(){     String[] a = new String[]{};     a.add('1');     a.add('2');     return a; }   please help Thanks
99392
On Case object, i have a quick Action &quot;Assign Case&quot; which looks as follows markup looks like this &lt;aura:component implements=&quot;force:lightningQuickAction,force:hasRecordId&quot; controller=&quot;AssignCaseController&quot;&gt;     &lt;aura:attribute name=&quot;record&quot; type=&quot;Object&quot;/&gt;     &lt;aura:attribute name=&quot;caseRecord&quot; type=&quot;Object&quot;/&gt;     &lt;aura:attribute name=&quot;recordError&quot; type=&quot;String&quot;/&gt;     &lt;aura:attribute name=&quot;isSpinnerVisible&quot; type=&quot;Boolean&quot; default=&quot;false&quot; access=&quot;private&quot; /&gt;      &lt;force:recordData recordId=&quot;{!v.recordId}&quot; layoutType=&quot;FULL&quot; targetRecord=&quot;{!v.record}&quot; targetFields=&quot;{!v.caseRecord}&quot; targetError=&quot;{!v.LDSErrors}&quot;/&gt;          &lt;div&gt;         &lt;aura:if isTrue=&quot;{!v.isSpinnerVisible}&quot; &gt;             &lt;div class=&quot;slds-modal slds-fade-in-open&quot;&gt;                 &lt;lightning:spinner variant=&quot;brand&quot; alternativeText=&quot;Loading&quot;/&gt;             &lt;/div&gt;         &lt;/aura:if&gt;                  &lt;div class=&quot;slds-grid slds-wrap&quot;&gt;             &lt;div class=&quot;slds-col slds-size_8-of-12 slds-form-element slds-text-align_center&quot;&gt; {!$Label.c.PF_AssignCase_DisplayMsg}&lt;/div&gt;             &lt;div class=&quot;slds-col slds-size_4-of-12 slds-form-element slds-text-align_right&quot;&gt;                 &lt;button onclick=&quot;{!c.runAssignmentRules}&quot; class=&quot;slds-button slds-button_brand&quot;&gt;Submit&lt;/button&gt;             &lt;/div&gt;         &lt;/div&gt;     &lt;/div&gt; &lt;/aura:component&gt;  From the picture, you can see that background is slightly colored, and i want background to be totally white (the way it is for standard quick Actions). I cant seem to achieve that. For the div where we have &lt;div class=&quot;slds-grid slds-wrap&quot;&gt;  I added a class &lt;div class=&quot;slds-grid slds-wrap whitebackground&quot;&gt;  In CSS for component, the class whitebackground has background color of &quot;white&quot; This only covers a portion of the component, as shown below-  Seems like one.app creates a wrapper around the component, which continues to stay grey and i cant seem to make it all white. Any suggestions?
83364
From SF :      There are some limitations on the depth of changes tracked for   rerendering in reactive properties. The tracking depth depends on the   type of the reactive property.      Lightning Web Components tracks changes to the internal values of   these types of reactive properties:         Primitive values    Plain objects created with {…}   Arrays created with []         Also SF does not track for complex types like Date.   Now what I wanna do is track an Array of complex object. If a new element is added subtracted from the array re-render the UI. Classic Data - table example.  So I declared my Markup:  &lt;template&gt;     &lt;h1&gt;Hello &lt;/h1&gt;     &lt;lightning-datatable                 key-field="id"                 data={data}                 columns={columns}                 is-loading={tableLoadingState}&gt;             &lt;/lightning-datatable&gt;              &lt;lightning-button variant="brand" label="Add row" title="Add row" onclick={addRow} class="slds-m-left_x-small"&gt;&lt;/lightning-button&gt; &lt;/template&gt;   JS:  import { LightningElement, track } from 'lwc'; const columns = [     { label: 'Label', fieldName: 'name', type:"text"},     { label: 'Website', fieldName: 'website', type: 'text' },     { label: 'Phone', fieldName: 'phone', type: 'text'  } ]; export default class App extends LightningElement {     @track data = [{name:'Mylabel' , website:'google.com' ,phone :'74126478963',amount : 45  }];     @track columns = columns;     @track tableLoadingState = false;      addRow(){         console.log('add row called');         this.data.push({name:'Mylabel2s' , website:'2google.com' ,phone :'74126478963',amount : 45 });         console.log(JSON.stringify(this.data));         //this.data =[];      }   }   When I save and try running this I get the message as shown in docs.  [LWC warning]: Property "_def" of [object:vm undefined (0)] is set to a non-trackable object, which means changes into that object cannot be observed. &lt;lightning-primitive-header-factory&gt;   which means I cannot track the row data for lightning-datatable, which also means when I add or remove rows I would be unsuccessful.  I could not find a solution to add row in datatable and get it updated back in the markup, I searched dev guide and recipe book. Is this a limitation? or there is a workaround?
121649
I am unable to pass parameter from the lightning controller to the apex class. Whenever I use debug the passed value seems null.  JavaScript Controller  add : function(cmp,event,helper) {      event.target.parentNode.style.display = 'none';     document.getElementById("cartdiv").style.display = 'block';     var selectedAccount =event.target.id;      var act = cmp.get("c.Cartveg");     act.setParams({"s":selectedAccount});     act.setParams({"cartlist" : cmp.get("v.cart")});     act.setCallback(this,function(a){         cmp.set("v.cartitem",a.getReturnValue());     });            $A.enqueueAction(act);     cmp.set("v.whichButton", selectedAccount); }   Apex Class  @AuraEnabled public static List&lt;Vegetable__c&gt; Cartveg(string s,List&lt;Vegetable__c&gt; cartlist) {       system.debug(s);   List&lt;Vegetable__c&gt;  clist= [SELECT Id, Name , Price__c , img__c                                  FROM Vegetable__c where Name =:s];      clist.addAll(cartlist);      system.debug(clist);     return clist; }   Value of s is null. Please help