The Stack Overflow podcast is back! Listen to an interview with our new CEO.
3

You cannot stop that, also it's not recommended to manipulate dom based on ID, as the framework replaces custom id to globally unique id in the page. So to get element you have two options. Get it by class query selector. get it by Data attribute. Here are the examples for the same. Class. let div = this.template.querySelector('.popup'); Using the data ...


2

You can't use the markup {!$Resource.MyJavascriptFile} in your actual static resource since Salesforce will not interpret that. It only evaluates that markup in the actual Visualforce page. However, you can still reference code from another static resource file just by calling it directly once they are both loaded in the VF page.


2

Hopefully you figured out this problem Calvin, I've been trying to work it out myself and found this, which helped solve it for me... https://developer.salesforce.com/forums/?id=9062I000000g555QAA Start with this promise, then call getEnclosingUtilityId, and inside that promise register the onUtilityClick event handler... doInit : function(component){ ...


1

you need to pass the function by reference and not invoke it directly while declaration. Later it will be invoked when the event is triggered. PFB: connectedCallback() { window.addEventListener('resize', this.myFunction); } @track count = 0; myFunction = () => { this.count = this.count += 1; console.log('resized => ', this.count); }; Here ...


1

Here is the code with explanation: // declare your array let myarr = [{"key":"January","intMon":0,"value":0},{"key":" February","intMon":1,"value":0},{"key":" March","intMon":2,"value":0},{"key":" April","intMon":3,"value":0},{"key":" May","intMon":4,"value":0},{"key":" June","intMon":5,"value":0},{"key":" July","intMon":6,"value":0},{"key":" August","...


1

You can define a span with data- attribute with category as value and set it the same way you are getting selected rows. Here is Playground link. <span class="slds-badge slds-badge_inverse" > SELECTED ITEMS PER TABLE - <span data-count={table.category}>0</span> </span> JS: getSelections() { // ---- ...


1

Don't define a default attribute. This causes the attribute to default to null. Eg <aura:attribute name="selectedObj" type="Object" />


1

You can only call your apex method in the lwc with @auraEnabled annotations. You can create a simple apex class and a method using the site class and then you can call in. The documentation link is here All the supported lwc modules are documented here


Only top voted, non community-wiki answers of a minimum length are eligible