Skip to main content

Questions tagged [es6]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
52 views

Import PDF.js into an LWC

I've uploaded a minified pdf.js file (CDN link) into a static resource, but when trying to use it, pdfjsLib is undefined no matter what I try. It was my unstanding that pdfjsLib would be defined and ...
upjosh's user avatar
  • 21
-2 votes
1 answer
945 views

Filter data on client side js in LWC

I have list of data like below format { "Category__c":"SUV", "Control__c":"Automatic", "Description__c":"Lorem Ipsum is ...
user2943892's user avatar
0 votes
0 answers
178 views

How to create reusable LWC to handle exceptions in JS?

I have created a reusable LWC JS file lwcExceptionLogging.js const lwcException = (err) => { console.log(err.name+'--Name'); var name = err.name; console.log('log Name--'+name); } export {...
Prathyusha's user avatar
0 votes
1 answer
627 views

How to add an object into another object - ES5

var filters = {'sort': 'asc', 'query': 'id=1'}; var data = {}; data.search = {'type': 'manual'}; Object.assign(data.search, filters); When using ES6 this code works correctly. But when it's in ES5 I ...
LuizEduardoMPF's user avatar
0 votes
1 answer
573 views

Refresh div tag in child component lwc

I am sending a value from a parent component to child inside div but it is not showing any value after first time Parent js startRecording(){ this.isRecording = !this.isRecording; if (this....
Aman Bhatia's user avatar
3 votes
2 answers
618 views

How can we define the events method in util.js or exernal js file and export that method in lwc component

How can we define the events method in util.js or external js file and pass event parameters, like handleOnclick(event)? For Example, I have one lwc component named - helloWorld and in my helloWorld....
sam's user avatar
  • 33
0 votes
0 answers
253 views

What is lwc doing to custom ES6 Proxies?

The Problem: I am experiencing broken behavior when I pass Proxies as Event details or as public properties. Requirement: they need to wrap a {nested: {value: "Foo"}}. I experienced this ...
itsmebasti's user avatar
  • 6,477
9 votes
2 answers
4k views

How to dynamically import a module in lwc

I am trying to import modules dynamically in my LWC component. While pushing the change I get a strange error LWC1509: This experimental syntax requires enabling the parser plugin: 'dynamicImport' ...
Anmol Kumar's user avatar
  • 3,651
2 votes
1 answer
4k views

Unable to Close Drop down menu on Outside click in LWC

I am unable to close the dropdown menu in LWC on clicking anywhere else on the page apart from the dropdown menu . Please find the code below , HTML Code : <a class="userStyle" role="button" ...
M SAI SHYAM MANOHAR's user avatar
1 vote
1 answer
7k views

'set' on proxy: trap returned falsish for property 'id' --- for an object in memory

I am getting the above error when trying to update a particular value of an object in memory. I understand I can not make changes to objects gathered from an @wire property. However, this should not ...
Rory's user avatar
  • 429
0 votes
1 answer
1k views

why @track list doesn't rerender after value is changed?

i have a list of sobject that is retrieved from the db thanks a call to an apex method tha return the list, the list is retrived async with a the setInterval function . //this is the sample of the ...
riccardo_castellano's user avatar
0 votes
1 answer
39 views

Any update about support for ES6+ on orgs with extended IE11 support

For SF orgs on which extended support for IE11 is enabled, this means that IE11 support is valid until 31 December 2020 (which is almost 1 year from now). Is there any update about possible support ...
Shamina's user avatar
  • 4,295
0 votes
1 answer
1k views

LWC merge objects

I want to merge objects dynamically. I have tried it but I didn't get the expected result let result = [ { Month: 7, OLIQU: 10, Year: 2018, AccountName: "Account1",...
user10286's user avatar
  • 422
7 votes
1 answer
5k views

When can I extend custom component in LWC?

As a general implementation guidelines of LWC, we should be extending standard LWC elements. Examples are: export default class MyComponent extends LightningElement (Most used) export default class ...
salesforce-sas's user avatar
5 votes
2 answers
3k views

import es6 from an extra javascript file in another component bundle in LWC

I think the documentation completely misses the case when you want to import an extra es6 module from another component bundle. Example, suppose we have the following folder structure. lwc module1 ...
alcoforado's user avatar
17 votes
4 answers
8k views

Feasibility to import entire LWC classes to access @api methods

I'm looking to modularize my LWC without having to embed them in the template. Ideally, would this kind of pattern be feasible? I'm not sure if it's my lack of ES6 knowledge (modules) or that LWC ...
tsalb's user avatar
  • 3,735
7 votes
2 answers
719 views

sfdx force:lightning:lint throwing a Parsing Error with ES6 syntax

I'm running the SFDX lightning linter on a lightning component as part of a pull request for my organization, but am hitting the following error: error Parsing error: Unexpected token > Line:57:...
Matthew Coleman's user avatar
6 votes
1 answer
3k views

Using constants in Lightning Components

What is the correct way of declaring and using constants in Lightning Components. I am seeing different behaviours depending on organisations I am in. Basic way of having pass-by-value and ...
dzh's user avatar
  • 4,155
13 votes
2 answers
2k views

ECMAScript2015 compatibility

As I understand it, the platform uses closure compiler to transpile code. And closure compiler officially supports ECMAScript 6 since 2015. But lightning-cli is configured to not allow version 6 or ...
Mr Smith's user avatar
  • 205
8 votes
1 answer
531 views

Salesforce-lightning-cli lint & ES6 const reserved word

I am currently writing lightning components and to do so I use Ecmascript2015 standard (Object.assign, const, let, ...). Everything works perfectly but the https://www.npmjs.com/package/salesforce-...
Simonp's user avatar
  • 1,902
11 votes
2 answers
1k views

Use of ES6 Default Function Parameter Value Spec in Lightning (Aura) Components

Whilst doing some cleanup of some Aura Components for Summer 16, I was creating a JS function in my helper. I had wanted to add some default values to that function using the new ES6 Default Parameter ...
pchittum's user avatar
  • 19.8k